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 4 of 4
  1. #1
    New Coder
    Join Date
    Jun 2007
    Posts
    21
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Closing div tag in FF, Chrome, IE

    Hi,

    I've seen lots of similar problems, but not quite this one. This page, http://natrlobs.sc22.info/ displays fine in Firefox, of course. In IE, I have forced it to display correctly by adding a conditional comment with an extra closing div tag below the closing tag for the right column div.
    Code:
    </div><!--close column right-->
    
    <!--[if IE]>
      </div>
    <![endif]-->
    But as far as I can find, there is no such conditional comment for targeting Chrome or Safari, both of which have this same problem. So in both browsers, the central light-coloured div, "container_12" appears shortened, and the footer div appears to crowd into the right column div.

    One little extra </div> will fix the whole page in IE, Chrome, and Safari...but alas, will break it in Firefox.


    What else can I do? Is there a problem with my doctype, which is
    Code:
    	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html dir="LTR" lang="en">
    <html dir="LTR" lang="en">
    I'm doing all this in OSCommerce, using a template based on the "rock solid" 960 grid system, FWIW.

    Thanks for any help!

  • #2
    Regular Coder djh101's Avatar
    Join Date
    May 2009
    Location
    California
    Posts
    614
    Thanks
    48
    Thanked 64 Times in 64 Posts
    http://validator.w3.org/check?uri=ht...Inline&group=0

    The </div> tag isn't your problem- you've got a lot of syntax errors before that.
    Code:
    <!--put any content here, divide space with divs grid_4
    ^ comment isn't closed, so the </div> tag below it is commented out and isn't going to do anything.
    Code:
    <!--[if IE]>
      </div>
    <![endif]-->
    You should only have as many closing tags as you have opening tags. What you are doing here is simply messing up your syntax even more for something that appears to fix your problems.

    Start with that. The rest of your syntax problems aren't really related to the problem posted.
    "Yeah science!"
    Online Science Tools

  • #3
    New Coder
    Join Date
    Jun 2007
    Posts
    21
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thank you SO much! I really appreciate your taking the time.

  • #4
    Regular Coder djh101's Avatar
    Join Date
    May 2009
    Location
    California
    Posts
    614
    Thanks
    48
    Thanked 64 Times in 64 Posts
    I'm 17 and I have no job. All I have is time.
    "Yeah science!"
    Online Science Tools


  •  

    Posting Permissions

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