Jump to content

Looking for help on achieving a style! Example Shown


Solarpitch

Recommended Posts

 

Hey,

 

Just wondering if someone can give me a hand with the below style. I am trying to use div's to style but there not my strong point. I can do the colour changing background on each result and that, but I am just having trouble trying to lay the information out in the 3 style column I have.

 

Thanks :D

 

 

example_1.gif

html:

<div class="odd">
    <div>column1 content</div>
    <div>column2 content</div>
    <div>
        <ul>
            <li>website</li>
            <li>e-mail</li>
            <li>phone</li>
        </ul>
    </div>
    <div class="clearer"></div> // you need this so the container extends to the height of the content
</div>
<div class="even">
    <div>column1 content</div>
    <div>column2 content</div>
    <div>
        <ul>
            <li>website</li>
            <li>e-mail</li>
            <li>phone</li>
        </ul>
    </div>
    <div class="clearer"></div> // you need this so the container extends to the height of the content
</div>

 

css:

div.even, div.odd{
    clear:both;
}

div.even div, div.odd div{
    float:left;
}

div.clearer{
   float:none;
   clear:both;
}

 

but it is much simpler with tables and like AndyB said there's no need for divs in this case

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.