/ Published in: CSS
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>2 columns, liquid, right rail, rail tallest</title> <style type="text/css"> #container{ background-color:#9cc; overflow:hidden; margin:0 100px; padding-right:150px; /* The width of the rail */ } * html #container{ height:1%; /* So IE plays nice */ } #content{ background-color:#9cc; width:100%; border-right:150px solid #c33; /* The width and color of the rail */ margin-right:-150px; /* Hat tip to Ryan Brill */ float:left; } #rail{ background-color:#c33; width:150px; float:left; margin-right:-150px; } </style> </head> <body> <div id="container"> <div id="content">This is some content This is some content This is some content</div> <div id="rail">This is<br />the rail</div> </div> </body> </html>