View Full Version : CSS
Ok, I'm a noob at CSS and now I want to experiment and self-teach myself.
How do I make a right and left column?
I have this:
http://www.xeoro.net/test/
+rep.
Frog!
27-03-2007, 04:39 PM
Wouldn't you use layers/divs?
Frog!
27-03-2007, 04:44 PM
I am ?
I'm a noob at CSS... :)
Drompo
27-03-2007, 04:47 PM
<div align="right">
<div align="left">
Frog!
27-03-2007, 04:48 PM
<div align="right">
<div align="left">
Sends it on a new line Ash.
<div style="position: absolute; left: AMOUNT OF PX AWAY FROM LEFT;"></div>
Edit that to help you like top: 0px; and left: 0px; and right: 0px;
It would be
<div id="box"></div>
<style type="text/css">
#box{
position: absolute;
left: Amount of pixels like Myke said;
}
</style>
try w3schools quite gd.
I prefer independent learning.
timROGERS
27-03-2007, 05:53 PM
never ever ever ever use absolute positioning :O It's bad :P
YouFail
27-03-2007, 06:23 PM
Seriously?! Noobs pls :P
Make a container and make left and right.
#cont {
width: 100%;
overflow: hidden;
}
#left {
width: 50%;
float: left;
}
#right {
width: 40%;
float: right;
}
<div id="container">
<div id="left">RICHARD OWNS PLS</div>
<div id="right">TIS TRUE PLS</div>
:)
Thanks rich. <3
+rep to everyone else as well.
ScottDiamond
27-03-2007, 07:22 PM
Use containers. :)
Mentor
27-03-2007, 07:24 PM
Seriously?! Noobs pls :P
Make a container and make left and right.
#cont {
width: 100%;
overflow: hidden;
}
#left {
width: 50%;
float: left;
}
#right {
width: 40%;
float: right;
}
<div id="container">
<div id="left">RICHARD OWNS PLS</div>
<div id="right">TIS TRUE PLS</div>
:)
<div id="container">
<div id="left">RICHARD OWNS PLS</div>
<div id="right">TIS TRUE PLS</div>
</div>
RICHARD forgot to close his container div.
YouFail
27-03-2007, 07:48 PM
<div id="container">
<div id="left">RICHARD OWNS PLS</div>
<div id="right">TIS TRUE PLS</div>
</div>
RICHARD forgot to close his container div.
Im truely sorry. Silly error. I'll go kill myself pls :P
Ty Mentor
QuickScriptz
27-03-2007, 09:36 PM
Well.... for the code above... Floating the right hand side column is completely unessecary, as long as you set the right hand side margin to wider than the left column then it will automatically align itself beside it. So like example.....
#cont {
width: 100%;
overflow: hidden;
}
#left {
width: 50%;
float: left;
}
#right {
margin: 0 0 0 52%;
width: 40%;
}
So just to sum it up.... The left column is 50% wide, so we set the left margin of the right column to 52% that way it won't run into the left column and will align itself beside it.
Note: the current columns don't line up beside each other in Maxthon/IE 6.
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2026 vBulletin Solutions Inc. All rights reserved.