Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ids and classes in Internet Explorer

Status
Not open for further replies.

Halcrow

Programmer
Aug 24, 2004
76
GB
ok, I have an h-tag, assigned with a class, nested inside a div-tag, assigned with an id. I wrote some style for my h-tag in my stylesheet, but when I load up my page in IE, the h-tag gets given the style assigned to the div-tag (with the id) and ignores the style for the h-tag.

If you're lost I'll demonstrate:


<div id="mydiv">
<h1 class="myh1">My Title</h1>
</div>

I gave style to myh1, but IE ignores it and gives it the style from mydiv. Is this a common problem with IE?
(everything is fine when viewed using Firefox)
 
This sounds like some kind of non-intentional CSS hack... show us minimal HTML + CSS code that behaves as you described.
 
Once you gace styles to "myh1" there should be no reason why they would be ignored. As vongrunt said, show us the code.

<!--#sig value=''É'' url='' -->
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top