By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,723 Members | 1,662 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,723 IT Pros & Developers. It's quick & easy.

two col issues with float right and left in css

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
*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

P: n/a
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.