Search code examples
htmlcsstexttabular

Not sure how to make this happen.. 4 sections of text spread evenly across page?


I have 4 small bodies of text that I'd like to display evenly across the page. Here's an image of what I have in mind:

ideal

Something tells me tables would be the best way to go, but a)I've always been told not to use them and b) because of that, I have no idea how to do so if that is in fact the best route to take.

I'm open to suggestions; any and all help is appreciated.


Solution

  • I believe something like this would work:

    CSS:

    html, body 
    {
        width: 100%;
        padding: 0px;
        margin: 0px;
        border: none;
    }
    div.content
    {
        float: left;
        vertical-align: top;
        margin: 0px;
        padding: 0px;
        width: 25%;
     }
    

    HTML:

    <div class="content">Blah</div><div class="content">blah blah</div>
    <div class="content">Blah Blah</div><div class="content">blah blah blah blah</div>
    

    See this jsFiddle