I've seen numerous posts on this and tried implementing several changes but nothing has worked this far. I am toying around with a simple 3 column css layout done by Paul O'B. In it, I am also attempting to do a css controlled menu with each link in the menu having a hover background color change. What happens when you hover over it? The whole menu box shifts to the right.
Hoping to get some insight on this. Code is pasted below. Pretty much everything is from Paul's layout thus far.
HTML Code:<!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> <title>Temp page</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="temp.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="container"> <div id="header"> <h1>Header</h1> </div> <div id="middle"> <div id="left"> <div id='box'> <div class='header'> Menu </div> <div class='link'> <a href='#'>Testing</a> </div> <div class='link'> Testing </div> <div class='link'> Testing </div> </div> </div> <div id="right"> <p>Right Content : This is some content : this is some right content</p> <p>Right Content : This is some content : this is some right content</p> <p>Right Content : This is some content : this is some right content</p> </div> <p>Middle content :</p> <br style="clear:both" /> </div> <div id="footer"> <h3>Footer | <a href="3colfixedtest_4.htm">Back to Main Demo</a> | Footer</h3> </div> </div> </body> </html>HTML Code:body { margin-top:10px; margin-left: 180px; margin-right: 180px; padding:10px; background:#CCDDEE; color:#000; } #container {/* red is background color of right column and image is bg of left column*/ background-color: #EDEDED; border:1px solid #000; padding: 12px; } #header { height:75px; border:1px solid #000; background:#EDE8CC; text-align:center; } #left { float:left; width:32%;/* note this width is 32% and not 20% */ margin-left:-31.9%;/* must be less than width */ position:relative; padding-top: 10px; height: 1%; } * html #left {margin-left:-31.9%;ma\rgin-left:-19.9%;/*ie6 still thinks left is 20% for some reason */} #left p, #right p {padding-left:5px} #right { margin-right:-31.9%;/* must be less than width */ float:right; width:32%;/* note this width is 32% and not 20% */ position:relative; } #middle { margin-left:20%; margin-right:20%; } * html #middle {height:1%;position:relative;}/* combat ie's 3 pixel jog */ #footer { clear:both; border:1px solid #000; height:50px; background: #EDE8CC; text-align:center; } h1,h3,p {margin-top:0} h3 {margin-bottom:0} #box { border: 1px solid #000000; width: 100px; } #box .header { background-color: blue; font-family: arial; font-size: 11px; font-weight: bold; color: white; } #box .link { background: white; font-family: arial; font-size: 11px; font-weight: normal; color: black; border-bottom: 1px dotted black; } #box a {display:block;} #box a:hover {background: black;}








Bookmarks