i am trying to get first-child to work in ie7 but i am not sure why it wont recognise it or overwrite the css. it works fine in every other browser apart from ie7:
thats what i do have currently. i just changed the div id by accident and didnt change my css as well. so for some unknown reason it doesnt respect it at all
I assume you are using a full doctype (with uri) and that there are no comments or anything else above the doctype. Otherwise you will be in quirks mode and IE will behave much like ie5.
yer its all validated and i have a local copy of the site on my machine and it works but i cant work out why it doens’t work. i can only presume it is because it is rather buggy.
Do you have a working demo of the bug that you can attach to this thread as that is the only way that we can be sure? Or if you have it online you can posts a link (or PM it to me if it needs to be private).
It works in my example as you can see so you should try and keep to that sort of construct.
unfortunatly i am unable to pass on an address as it is for work. so im sorry i am unable to do that. i do see your point it should work but i havent got a clue why it doesnt want to work online.
my next best solution was to add a class to the h4 and take the border off there.
after looking at it again in ie. when i do that first-child ie7 changes my border: none to border-top-style.
It’s the border-style that dictates whether there is a border or not and when you say border-top:none you are effectively saying border-top-style:none.
In case you have specificity issues you could try this: