Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2012
    Thanked 0 Times in 0 Posts

    Vertical align divs html

    So I'm new to this. Very very new. And I don't how to explain this so I drew pictures.

    The squares are the divs with text in it.

    What it looks like:

    What I want:

    Basically I did this with float:left, margin:0, float:right;margin:auto, and then breaks in between. But it doesn't look like I want. This is for a userpage on a website, not my website. And the website doesn't seem to support anything but the most basic html. I've tried using I guess, fancier ways to do it and the website just didn't recognize the code. Or I did it wrong, which is entirely possible.

  2. #2
    Registered User
    Join Date
    Jun 2011
    Thanked 241 Times in 240 Posts
    You would need to set up the page with a left and right side, unless you had some better experience with floating.

    <div id="sidebar">
        <!-- Left Side -->
    <div id="main-content">
        <!-- Right Side -->
    Do you have to have it by each row? I think two columns (code above) is a much better approach?
    Last edited by Sammy12; 09-15-2012 at 08:29 PM.


Posting Permissions

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