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)

New User

joined:Mar 5, 2012
votes: 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 June 29, 2012 (gmt 0)

Senior Member

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

joined:July 3, 2002
votes: 0

I assume they wanted to comment out those items.
12:42 pm on June 29, 2012 (gmt 0)

New User

joined:Mar 5, 2012
votes: 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 June 29, 2012 (gmt 0)

Junior Member

10+ Year Member

joined:May 28, 2003
posts: 198
votes: 4

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.