Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
containers side by side
Old 01-18-2007, 11:30 PM containers side by side
blackhawkpowers's Avatar
Ultra Talker

Posts: 313
Name: Dustin
Location: GA
Trades: 0
I know this is a simple issue but I for the life of me can't fix it I have 5 containers and I want them to be on the screen from left to right but instead they stack themselves vertically the code is as follows

.container {
width: 20%;
border: 1px dashed red;
}


the html looks like
<html>
<body>
<div class="container"> test </div>
<div class="container"> test </div>
<div class="container"> test </div>
<div class="container"> test </div>
<div class="container"> test </div>
</body>
</html>


well I figured it out and I just needed to float the containers left and it works fine
__________________
A patch is a piece of software which replaces old bugs with new bugs.

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by blackhawkpowers; 01-18-2007 at 11:34 PM..
blackhawkpowers is offline
Reply With Quote
View Public Profile Visit blackhawkpowers's homepage!
 
 
Register now for full access!
Old 01-19-2007, 01:28 AM Re: containers side by side
Banned

Posts: 905
Name: Travel Agent
Trades: 0
I see where you fixed it, but for those who struggle with the same problem, here's how to solve it:


HTML:
<div class="block1">Text</div>
<div class="block2">Text</div>
<div class="block3">Text</div>

CSS:
.block1 {
background-color: blue;
height: 50px;
width: 100px;
float: left;
}
.block2 {
background-color: green;
height: 50px;
width: 100px;
float: left;
margin-left: 20px;
}
.block3 {
background-color: red;
height: 50px;
width: 100px;
float: left;
margin-left: 20px;
}

travelagent is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to containers side by side
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.49012 seconds with 12 queries