Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Floating in IE

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #23316
    mofle
    Member

    I’m making a website with some floating. It works perfectly in Firefox and Safari, but not in Internet Explorer.

    Can someone please help me with this?

    Code:




    left
    bottom

    Background image
    #50097
    Spunkmeyer
    Member

    1) You’re missing a closing ">" on your content div. Add that in and it works fine in ie 6/7 (i copied the code and did it myself and it works / validates)

    2) Also, you have no character encoding declared. You need that for it to validate, which is always a good thing to do. Add a standard UTF-8 character encoding by adding "<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>" to the <head> section of your page.

    3) Your <img> tag does not comply with xhtml standards as you’ve declared the code to be at the top of your header. It needs a closing forward slash, ie <img src="http://&#8230;." alt="something" />

    4) Also, your <head> parent tag is not finished. You need a <title> element for it to validate.

    5) I should also point out that "overflow-y" doesn’t exist in css 2.1, it does in css 3 though. As css 3 hasn’t been released by the w3c, it won’t validate unless you take that out.

    6) I assume you included the css in the xhtml for the purpose of this post, but make sure you include it in a separate file and link it in the head.

    I would suggest double checking your urls at the W3C validation service’s website: http://validator.w3.org/

    Here’s the code:

    Code:




    Name of Page

    left
    bottom

    Background image


    #50139
    mofle
    Member

    Thanks for a quick answer, i found the error right after posting, it was the number 1 that caused it.

    #50150
    Spunkmeyer
    Member

    Yeah, I realize that #1 was what caused your problem. I was merely pointing out issues with that code that are just as important. There’s no point in having a strict doctype if you don’t adhere to it. Catching issues at the beginning is a lot easier than going back through hundreds of lines of code/css later.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.