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 to the CF scene
    Join Date
    Feb 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    style.css / html layout trouble

    hi,
    I have this layout I made by reading this tutorial, and the navigation doesn't seem to look right, it's suppose to be at the very top but its always at the bottom of the content,
    I might have done something wrong because I didn't follow the tutorial exactly, so err can anyone help?

    http://avia.synthoxide.net/award.php

    There's the layout code,
    It looked okay in mozilla, so it only looks wierd in ie (or the last time i checked, it did) and i'm not really sure if the problem is in the style sheet or the html file...

    thanks ^^

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Float the sidebar to the left and add this at the top of your page.
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    and in #container add margin:auto;.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New to the CF scene
    Join Date
    Feb 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I did what you asked but all it did was put the sidebar/navigation below the text, since both are put to float: left;
    and was I suppose to add margin: auto or replace it to margin: 0?

    and for the code i'm utting at the top of the page, am I suppose to put it above <html>? I've seen it before, don't you add it to check if the layout is validated in html? (I think)

    sorry for all the questions ><;;

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    No the doctype is there so the browser knows how to render the page. Without it IE goes into quirks mode. I forgot to mention that you need to remove this from #main
    Code:
    width : 100&#37;;
    clear : both;
    Because of that the sidebar had no where to go. margin:auto; replaces margin:0;

    The doctype is in the correct place.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #5
    New to the CF scene
    Join Date
    Feb 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thank you!!!


  •  

    Posting Permissions

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