Print Reseller Scheme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

DIV Code question

Discussion in 'Website Design Forum:' started by HippySunshine, Oct 29, 2009.

  1. HippySunshine

    HippySunshine Senior Member

    Probably quite a simple answer, but how do I get my DIV's to flow horizontaly to create a horizontal website? :confused:

    Thanks x
  2. Kevin

    Kevin Senior Member

    Just float all of them to the left...
  3. HippySunshine

    HippySunshine Senior Member

    Thats what i was looking for. thank you :D
  4. HippySunshine

    HippySunshine Senior Member

    i coudln't remember what code changed it!
  5. Kevin

    Kevin Senior Member


    Define it in your css, either make all divs float left or just to a certain class.

    div { float:left; }ordiv.horizontal { float:left; }
    Resulting in <div class="horizontal"></div> for your html ;)

    It's probably wiser to pick the last option because I'm not sure if floating your container div will work out the way you want it to.
  6. designium

    designium Member

    but you need a inline container right?

  7. Harry

    Harry Senior Member

    And div.horizontal is a bad class name, as it's stylistic :p
  8. Kevin

    Kevin Senior Member

    I'm sorry Harry, I fail at life :(
    But he's right though, using a class such as .post or .article would be more suitable :p
  9. syrus69

    syrus69 Junior Member

    i always put all my css in an external file and link to the file in the header,
    if you would the divs to flow horizontally you need to float them and assign the display attribute
    something like this should do it

  10. Harry

    Harry Senior Member

    You wouldn't use IDs though, you'd use classes…
  11. HippySunshine

    HippySunshine Senior Member

    Ok so i had a play around and come up with Horizontal test ...
    But its scrolling verticaly instead of horizontaly and if you lookw hen you scroll, I have my first content box BEHIND my sidebar nav.

    I want the header, sidebar and ooter fixed where they are and the content DIVs to scroll horizontaly.

    I know I am probably missing something simple but please help :(
  12. HippySunshine

    HippySunshine Senior Member

Share This Page