homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

What is the role of # in front of CSS declaration (not overall rule, b

Msg#: 4470887 posted 12:30 pm on Jun 29, 2012 (gmt 0)

I am looking at something like this:

#content {
float: ;left;
#max-width: 67%;
max-width: 68%;
#margin-left: 15px;

aside {
#width: 100%;
#clear: left;
margin-top: 40px;
#background: #f0f0f0;
padding: 10px 10px 0 10px;

What would be the difference between "#max-width:" and "max-width", for example? Why "#background:" and not "background:" etc?

Thank you.



WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Msg#: 4470887 posted 12:36 pm on Jun 29, 2012 (gmt 0)

I assume they wanted to comment out those items.


Msg#: 4470887 posted 12:42 pm on Jun 29, 2012 (gmt 0)

Yes, thats what it is:

This is uncommmented code. Itís old code with no function. It can be removed. Normally I donít delete old code immediately, but I comment it out, for safety.

Thank you.


10+ Year Member

Msg#: 4470887 posted 3:08 pm on Jun 29, 2012 (gmt 0)

It is not advised to use that method to comment out code as you should use proper css comments if you want to hide sections of code.

In the above code IE7 and under will actually read all those styles that have a hash in front of them and is a common way to target IE7 and under but is an invalid hack and should be avoided.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved