...

View Full Version : Losing text background in IE



cable2001
06-11-2010, 08:24 PM
I'm working on a site redesign and I've done something to upset Internet Explorer. It doesn't help that I'm still very new to CSS.

This is the page: http://www.willowaynurseries.com/redesign/index2.html
(username: willoway, password: proof)

The "Three locations to serve you", "Videos" and "Special Programs" are supposed to have a green background. They do in FireFox and Safari, but not IE.

The CSS is here: http://www.willowaynurseries.com/redesign/willoway.css

The relevant tag is H7.

Can anyone see what I did wrong? I'm flummoxed.

tinimic
06-12-2010, 05:27 AM
You have tried to define an element
h7 in your CSS that IE doesn't understand (or any browser, for that matter). IE just ignores what it doesn't understand.

You can change the h7 selector to a class in your CSS,
.h7 then change your markup where you use the h7 tag to <p class="h7"> and it will work in all browsers.

Your CSS validates, but there are numerous errors in your markup that should be addressed. You can check your markup at: http://validator.w3.org/

Scriptet
06-12-2010, 11:42 PM
Yeah you can't just create your own elements you know! Surley headings 6 levels deep is suffice for even the most complex of docs anyway you would have thought?!

Also IE has serious problems just supporting elements which are part of the HTML spec as it is so i'm surprised the browser hasn't exploded at the sight of this h7!

cable2001
06-14-2010, 02:05 PM
Thanks tinimic, I'll try that. I'm just working with a Dreamweaver template as I teach myself CSS so that's why I just added a heading instead of redefining an existing one. I had no idea it would cause a problem.

Kor
06-14-2010, 02:14 PM
Thanks tinimic, I'll try that. I'm just working with a Dreamweaver template as I teach myself CSS so that's why I just added a heading instead of redefining an existing one. I had no idea it would cause a problem.
Use carefully DW templates. You should rather rely on how the document looks like on real browsers.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum