Skip to content
WJunction - Webmaster Forum

CSS Columns

Status
Not open for further replies.
hi,

hmm i wanna make these <div>'s into columns, currently they appear under each other atm

Code:
        <div class="type"><b><?=ucfirst($dl['type'])?></b></div>
            <div class="item"><a href="download.php?id=<?=$dl['id']?>"><?=$dl['title']?></a></div>
                <div class="date">Date</div>
                    <div class="provider"><?=$dl['siteLink']?></div>

her's css too:

Code:
#dldTable .type { 
    margin-left:15px;
    margin-top:5px;
    float:left;
    width:50px;
    text-align:left; }
    
#dldTable .item { 
    margin-top:5px;
    float:right;
    width:510px; 
    text-align: left; }

#dldTable .date {
    margin-top:5px;
    float:left;
    width:100px;
    text-align:left; }
    
#dldTable .provider {
    margin-top:5px;
    float:right;
    width:100px;
    text-align:left; }

plz can some1 help, been hunting this for ages now wif no luck
 

2 comments

you can do it a few ways, but the easiest is like so:

Code:
.myColumn {width: 33%; float: left;}
then just label 3 divs as class="myColumn" and they will be side by side. Note that each is 33%. if you wanted 2, it would be 50%, etc etc.
 
Status
Not open for further replies.

About the author

C
Banned · Joined
901
Messages
17
Reactions
18
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom