Welcome to WebmasterWorld Guest from

Forum Moderators: not2easy

Message Too Old, No Replies

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



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.


12:36 pm on Jun 29, 2012 (gmt 0)

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

I assume they wanted to comment out those items.


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.


3:08 pm on Jun 29, 2012 (gmt 0)

10+ Year Member

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.

Featured Threads

Hot Threads This Week

Hot Threads This Month