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

Link to comment
Share on other sites

Actually, that looks like tabular information which makes the html table the ideal way to present the information. By all means style the content, but don't force tabular data into a CSS div arrangement - makes no sense.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.