Thu, 2010-09-02 19:24
Dear forum,
I'd like to position my two CSS-boxes next to eachother on the X-angle, also I'd like to make my mainContent's box to be a static size and not follow the content's size!
Please help!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>NTIWeb</title> </head> <style type="text/css"> body { font: 100% Verdana, Arial, Helvetica, sans-serif; background: #666666; margin: 0; padding: 0; text-align: center; color: #000000; } .mainContent{ float:none; border: 1px solid black; margin-right:10%; margin-left:10%; height:80%; width:80%; background:#0099CC; } .topmenu{ float:none; width:80%; height:24px; margin:0 auto; border: 1px solid #000000; background:#FF6600 } .leftmenu{ float:left; width:10%; height:80%; background:#FF6600; margin-top:24px; } a.btn:visited, a.btn:link { text-decoration:none; color:#000000; font:"Courier New", Courier, "fast breddsteg"; padding:6px; border-left:1px solid #000000; border-right:1px solid #000000; } a.btn:hover, a.btn:active { font:bold; background:#FF3300; } </style> <body> <!--TOPMENU--> <div class="topmenu"><a class="btn" href="http://www.google.se">Google</a><a class="btn" href="http://www.google.se">Page</a></div> <!--LEFTMENU--> <div class="leftmenu"> abc </div> <!--mainContent--> <div class="mainContent"> :( </div> </body> </html>
Thu, 2010-09-02 20:35
#1
linde12 wrote: I'd like to
I'd like to position my two CSS-boxes next to eachother
Use floats
...make my mainContent's box to be a static size and not follow the content's size!
Use fixed pixel dimensions, not percents.
.mainContent{ width: 200px; height: 600px;}
