469,280 Members | 1,811 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,280 developers. It's quick & easy.

two col issues with float right and left in css

Does anybody know why I can't get a simple two col design to work
using the following css? At the moment my columns seem to be arranging
left and right correctly but are stacked on top of each other?

the site is : http://www.rockshore.net/html/hol2.html

div.lh-col{
width: 18%;
float:left;
border: solid #333333;
border-width: 0 0px 0 0;
background: #ffffff;
color: #333333;
margin: 0;
padding: 40px;
}

div.rh-col{
width: 78%;
float: right;
background: #c0c0c0;
color: #333333;
margin: 0;
padding: 3px;
border: solid #333333;
border-width: 0 1px 0 1px
}

tnx,
Jon
Jul 20 '05 #1
2 2247
*jon slinn* <jo******@yahoo.co.uk>:

div.lh-col{
width: 18%;
float:left;
padding: 40px;
}

div.rh-col{
width: 78%;
float: right;
padding: 3px;
border-width: 0 1px 0 1px
}


Your viewport would have to be at least 2200px wide to have 4% (= 100% -
18% - 78%) of it be greater than 88px (= 240px + 23px + 21px).

--
"It is impossible to enjoy idling thoroughly
unless one has plenty of work to do." Jerome K. Jerome
Jul 20 '05 #2
Hi jon.

What about this?:

http://members.rogers.com/rmacinty2/rockshor/hol2.htm

I tried to work within what I felt to be your constraints, but I think you
may need to specify a width for floats.
Anyway, I did it to learn something for myself as well. :-)

"jon slinn" <jo******@yahoo.co.uk> wrote in message
news:bd**************************@posting.google.c om...
Does anybody know why I can't get a simple two col design to work
using the following css? At the moment my columns seem to be arranging
left and right correctly but are stacked on top of each other?

the site is : http://www.rockshore.net/html/hol2.html

div.lh-col{
width: 18%;
float:left;
border: solid #333333;
border-width: 0 0px 0 0;
background: #ffffff;
color: #333333;
margin: 0;
padding: 40px;
}

div.rh-col{
width: 78%;
float: right;
background: #c0c0c0;
color: #333333;
margin: 0;
padding: 3px;
border: solid #333333;
border-width: 0 1px 0 1px
}

tnx,
Jon

Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Penguinny | last post: by
2 posts views Thread by Dr. Richard E. Hawkins | last post: by
3 posts views Thread by hantechs | last post: by
1 post views Thread by adz1809 | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.