Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthoraderra
    • CommentTimeMar 6th 2007
     permalink
    I am new to CSS and working on my first site with it (no more layout tables!!)
    The URL is http://www.aderra.net
    Everything seems find in Firefox and IE6 but when I go to the page in IE7 I have to scroll over to the right to be able to see the text in the center div.
    Any thoughts on how I can correct this?
    Thank you,

    E.D.
    • CommentAuthordavist11
    • CommentTimeMar 6th 2007
     permalink
    It doesn't look right to me in FF either; it is off center. Try changing this:

    div#center {
    margin:0px 250px;
    }


    To this:
    div#center {
    margin:0px auto;
    }
    • CommentAuthoraderra
    • CommentTimeMar 6th 2007
     permalink
    Davist11,

    Thanks. Now it align the center div all the way to the right in IE7 but centers it much better in FF.
    Is there something specifc I need to add for IE7?

    E.D.
    • CommentAuthordavist11
    • CommentTimeMar 6th 2007
     permalink
    This is what I see in your center div:

    div#center {
    position: relative; top: 0px; left: 125px;
    /*margin:0px auto;*/
    width: 770px;
    }


    You do not need the top: 0px; or left: 125px; if you want it centered. Just uncomment the margin: 0px auto; and you should be good to go
    • CommentAuthoraderra
    • CommentTimeMar 6th 2007
     permalink
    Davist11,

    I did it and now the center div is to the left side in IE7. Looks great in everything though.
    When I use position: relative I can push over in IE7 but then it is uncentered in FF.
    Is it possible that something else is interfering???

    Thanks so much,
    E.D.
    • CommentAuthordavist11
    • CommentTimeMar 6th 2007
     permalink
    Hmm, I just noticed that you don't have a doctype in there

    Replace the opening html tag with this:


    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-ca">
    • CommentAuthoraderra
    • CommentTimeMar 6th 2007
     permalink
    Ta da! That did it. Thank you so much for your patience and help!
    • CommentAuthoraalaap
    • CommentTimeMar 16th 2009 edited
     permalink
    In addition to the xmlns, I had to add a doctype tag to get IE to play along:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    It doesn't have to be Strict. In fact, it doesn't even have to have any attributes. Just put <!DOCTYPE> and all is well with IE :-)
Add your comments
    Username Password
  • Format comments as (Help)