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 / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

html5 pseudo div
making new elements a div in older browsers

5+ Year Member

Msg#: 4514216 posted 3:38 pm on Oct 31, 2012 (gmt 0)

trying to put together some css that will give html5 elements div properties in older broswers.

.nav { display:block; margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit;vertical-align: baseline;}

but it helps some elements and not others. Am i missing something to add to the properties?



WebmasterWorld Senior Member lucy24 us a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month

Msg#: 4514216 posted 9:48 pm on Oct 31, 2012 (gmt 0)

Is .nav a class or an element? If it's a class, as the leading . implies, you also have to look at the elements you apply it to, and make sure your css overrides those elements' properties. (Hint: If you are using !important you are doing it wrong.) So not just
but also
p .nav
li .nav
p#superimportantheading .nav
and so on depending on your specific circumstances.

General principle: if you ever need
element1.class1 (for example "td.foobar")

to override
element2.class2 element1 (for example "tr.widget td")

make sure you include, by name,
element2.class2 element1.class1 ("tr.widget td.foobar")


WebmasterWorld Senior Member 5+ Year Member

Msg#: 4514216 posted 12:06 am on Nov 1, 2012 (gmt 0)

All browsers implement the html5 elements except IE8 and under so you shouldn't have to do this. If you want to cover those browsers, too, Google for "html5shiv".

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
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