Jump to content

CSS Poll  

13 members have voted

  1. 1. Do you prefer the use of dashes or underscores in element names?

    • Dash ( - )
    • Underscore ( _ )
    • No preference
      0


Recommended Posts

Posted

I've seen this discussed elsewhere but wondered what our phpVMS developers' preferences are. Personally I use dashes, but I use underscores in image filenames.

For those confused, by element name I mean:

#main {}

So, for example, do you use:

#main-div {}

or

#main_div {}

?

Posted

Underscore is messy IMO... always a dash in CSS for me.

Also just noticed your examples all use IDs - best practice is to never use IDs in CSS - to override the style of an ID you need 256 classes - so stick to just using classes as much as possible.

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...