Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Mar 2010
    Location
    Ohio
    Posts
    29
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Losing text background in IE

    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.

  • #2
    New Coder
    Join Date
    May 2010
    Location
    Midwest, USA
    Posts
    11
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Losing text background in IE

    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/
    Last edited by tinimic; 06-12-2010 at 06:31 AM. Reason: spelling

  • Users who have thanked tinimic for this post:

    cable2001 (06-14-2010)

  • #3
    Regular Coder
    Join Date
    Apr 2008
    Posts
    685
    Thanks
    15
    Thanked 105 Times in 104 Posts
    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!

  • #4
    New Coder
    Join Date
    Mar 2010
    Location
    Ohio
    Posts
    29
    Thanks
    13
    Thanked 0 Times in 0 Posts
    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.

  • #5
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Quote Originally Posted by cable2001 View Post
    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.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •