473,897 Members | 3,115 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2396
*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 (= 2·40px + 2·3px + 2·1px).

--
"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.goo gle.com...
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4323
by: Penguinny | last post by:
Dear all, I am trying to make a relatively simple layout with two adjustment columns filled with short news pieces, but there's a catch. I cannot control the html for these news bits, so I am left with CSS only for positioning etc. My problem is the following. The most natural way to do what I want is to use "float: left" (or "float: right") for my news bits and see them all filling the space. However, there's the catch: if the news...
2
5726
by: Dr. Richard E. Hawkins | last post by:
I've googled around, and asked everyone I know, but I still can't find any reference to anyone else having faced this particular IE bug with floats. I've put a page at http://dochawk.org/sample.html . This was made by stripping out the google ads from the regular pages. It validates as strict 4.01 at http://validator.w3.org. (The google ads drive it nuts!) The main (right) column is made with alternating left and right floats to...
0
2287
by: listaction | last post by:
Hello All, I'm trying to avoid use of tables for layout purposes. So I have the layout positioned using css and <div>. When the browser window is resized by clicking & dragging the mouse, the text doesn't transform gracefully as it would if I were to use tables for layout. Any way to fix this, and continue to use DIV or is the only way to go back to tables? Browsers used: Internet Explorer and Firefox
0
2060
by: jonipony | last post by:
HELP: Float Left box is drifting to the right in ie! -------------------------- I need som HELP with my CSS coding! On the following web page my design falls apart at screen size 800 x 600 (looks fine at larger screen sizes) when the left menu box that should float left is drifting to the right in Internet Explorer 6.0 (it doesn't drift to the right in Netscape 7.1).
3
1777
by: hantechs | last post by:
<html> <body> <p style="width:30%;">text1</p> <p style="float:left;">text2</p> </body> </html> The effect of this html code is : text1 and text2 each is on a line. My question is: Why text2 is positioned on the right of text1? Because the CSS2.1 said: A floating element must be placed as high as possible; A left-floating element must be put as far to the left as possible; A
1
1735
by: adz1809 | last post by:
I have a page with the following code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link type="text/css" rel="stylesheet" href="styles/default.css" media="screen" /> <title>Untitled Document</title>
27
3926
by: GloStix | last post by:
WARNING VIDEO TAKES A WHILE TO LOAD http://screencast.com/t/BWQ6DNtsM I really don't know how to fix this other than putting another div. But I dont' exactly want to do that for every page. random div's everywhere Is there any other way? Also I'm trying to get a scaled thumbnail of the orginal picture WHILE maintaining the size of the css box.. Is that possible? Or do I have to scale it in Photoshop and make a separate image =\
4
3736
by: PianoMan64 | last post by:
Hey Experts, I'm not sure how to get around this, and any help would be most greatfull. I have an issue with having a CSS menu that displays correctly in IE and not correctly in Firefox 3.0.3, and also in Apples safari browsers, of the ones that I've tested. My question is this: Do I have to develop separate pages for IE 7 and below and all other browsers in order to make it compatible with all the possible browsers that are out...
3
2293
by: jrod11 | last post by:
Hi everyone, I'm working on creating a company intranet or my company and having trouble with IE. I have a navigation bar at the bottom of my page that is a quick links bar and is a fixed position. the background image is a .jpg. Depending on the computer, the background image will appear or not show up at all. The weird part is that the SAME version of IE 8 will show it on one computer, but another computer that has IE 8 will not. I...
0
9992
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10480
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9658
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7187
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5876
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4701
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3303
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.