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 10 of 10
  1. #1
    New to the CF scene
    Join Date
    Jun 2004
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    css alignment issue

    hello, I'm working on a site right now while I wait for the domains and hosting stuff to finish processing, but I've run into a couple problems. I'm relatively new to css so I don't know how to solve them.

    I am trying to design a site to have a simple layout so that there is the header at the top, and underneath, the main content. The main content would be divided into the navigation menu at the left and the content at the right. The problems I'm having are:

    The site won't stay at the very top (there is a gap between the top of the screen and the container). You probably won't be able to see this on the free hosting service I am currently using.
    The navigation menu and content will not go side by side.

    Any suggestions?

    the temporary site is here:

    http://akos91.bravehost.com/

    and the stylesheet is here:

    http://akos91.bravehost.com/style/style.css

    thanks for any help!

  • #2
    Senior Coder
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    2,469
    Thanks
    0
    Thanked 0 Times in 0 Posts
    try adding to your body css:
    margin: 0px;
    padding: 0px;


    That should remove it.
    // Art is what you can get away with. <-- Andy Warhol
    ...:.:::: bradyjfrey.com : htmldog : ::::.:...

  • #3
    New Coder
    Join Date
    May 2004
    Location
    ****creak, No Paddle
    Posts
    74
    Thanks
    0
    Thanked 0 Times in 0 Posts
    To get the nav + cont side by side you're gonna have to either float them or absolutley position them. Oh and declare margin/padding: 0 in your style sheet to remove the space at the top of the page.

  • #4
    New to the CF scene
    Join Date
    Jun 2004
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    when I tried floating the div's, the nav and content divs were moved out of the container div. I don't know why this happens, though. I've looked on other sites and it seems to have worked fine for them.

    the body margin/padding thing worked, thanks. the absolute positioning didn't work either, though.

  • #5
    Senior Coder
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    2,469
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by purekarma
    the absolute positioning didn't work either, though.
    It should, there may be a little error in how you are writing it. If you post the code, I'm sure we can figure it out Glad the first one worked.
    // Art is what you can get away with. <-- Andy Warhol
    ...:.:::: bradyjfrey.com : htmldog : ::::.:...

  • #6
    Senior Coder
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    1,963
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by purekarma
    when I tried floating the div's, the nav and content divs were moved out of the container div.
    Floated elements do not cause their parent element to extend.
    In normal speak, that means you need to "clear" the floats if you want the parent container to extend.
    eg:
    Code:
    <div id="container">
      <div id="left"></div>
      <div id="right"></div>
      <div style="clear:both;><!--needs this--></div>
    </div>
    Obviously you should reference that style info via a class instead of inline...
    The "<!---->" comment is to make mozilla (if memory serves) render the empty div.
    Last edited by mindlessLemming; 06-12-2004 at 02:18 PM.

    I take no responsibility for the above nonsense.


    Left Justified

  • #7
    New Coder
    Join Date
    May 2004
    Location
    ****creak, No Paddle
    Posts
    74
    Thanks
    0
    Thanked 0 Times in 0 Posts
    mindlessLemming's right, you need to clear it. But you can do it without the extra div. Check here to learn how.

  • #8
    Senior Coder
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    1,963
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Doh! I should have remebered that one. After all, I was at the WSG meeting where Tony Asslet announced it

    I take no responsibility for the above nonsense.


    Left Justified

  • #9
    New Coder
    Join Date
    May 2004
    Location
    ****creak, No Paddle
    Posts
    74
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by mindlessLemming
    Doh! I should have remebered that one. After all, I was at the WSG meeting where Tony Asslet announced it
    Hehe. Do the WSG hold meetings in Australia only? I'd love to goto meetings like that here in England.

  • #10
    Senior Coder
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    1,963
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [offtopic]
    Yes, unfortunately their meetings are only in Australia, atm. But their mailing list has a an international focus, with many members from UK. (Though I still prefer this forum over any list )

    I take no responsibility for the above nonsense.


    Left Justified


  •  

    Posting Permissions

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