homepage Welcome to WebmasterWorld Guest from 54.211.190.232
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Website
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: DrDoc

CSS Forum

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




msg:4470889
 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.

 

g1smd




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

I assume they wanted to comment out those items.

tnet21




msg:4470895
 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.

Paul_o_b




msg:4470929
 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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved