I'm having some problems designing my page and was hoping someone here
could help out!
My problems:
* I need something equivalent to min-width for IE
* My menu seems to overlap the content area
* When the right side of FF passes the menu, it jumps down a bit on
the page
Any help would be greatly appreciated!
Cheers :)
Here are my sources:
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 id="ctl00_Head1">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" media="screen" href="css/
main.css" title="Main CSS">
<link rel="stylesheet" type="text/css" media="screen" href="css/
tabs.css" title="Main CSS">
<title></title>
</head>
<body id="news">
<form name="aspnetForm" method="post" action="default.aspx"
id="aspnetForm">
<div id="top"><br/><br/><p/><h1>logo</h1><p/><br/><br/></div>
<div id="middle">
<div id="leftcolumn">Left menu</div>
<div id="rightcolumn">Right menu</div>
<div id="menupanel">
<div id="header">
<ul>
<li id="nav-home"><a href="#">Home</a></li>
<li id="nav-news"><a href="#">News</a></li>
<li id="nav-products"><a href="#">Products</a></li>
<li id="nav-about"><a href="#">About</a></li>
<li id="nav-contact"><a href="#">Contact</a></li>
</ul>
</div>
</div>
<div id="content">
Some text...
<p>
</p>ff<p>
</p>dd<p>
</p>ff<p>
</p>dd<p>
</p>ff<p>
</p>dd<p>
...and then some...!
</p></div>
</div>
</div>
</form>
</body></html>
</code>
main.css:
<code>
BODY
{
min-height: 100%;
text-align: center;
background-image: url(../images/background.png);
background-repeat: repeat-x;
position: relative;
padding: 0px;
margin: 0px;
width: 100%;
height: 100%;
margin-left: auto;
margin-right: auto;
}
#top {width: 100%; }
#logo
{
width: 800px;
height: 100px;
border: 2px solid #C3947F;
margin-left: auto;
margin-right: auto;
margin-top: 10px;
margin-top: 10px;
}
#menupanel {margin: 0px 150px; min-width: 550px; float: none;}
#middle {width: 100%; }
#leftcolumn { margin-top: 50px; float: left; width: 150px; }
#rightcolumn { margin-top: 50px; float: right; width: 150px;}
#content {
min-width: 550px;
margin: 0 155px;
border-bottom: 2px solid #C3947F;
border-top: none;
border-left: 2px solid #C3947F;
border-right: 2px solid #C3947F;
background-color: #ffffff;}
#footer { width: 100%; }
</code>
tabs.css
<code>
body {
margin:0;
padding:0;
color:#000;
font:x-small/1.5em Georgia,Serif;
voice-family: "\"}\""; voice-family:inherit;
font-size:small;
} html>body {font-size:small;}
#header {
float:left;
width:100%;
font-size:93%;
line-height:normal;
}
#header ul {
margin:0;
padding:10px 10px 0;
list-style:none;
}
#header li {
float:left;
background:url("../images/left_both.gif") no-repeat left top;
margin:0;
padding:0 0 0 9px;
border-bottom:1px solid #765;
}
#header a {
float:left;
display:block;
width:.1em;
background:url("../images/right_both.gif") no-repeat right top;
padding:5px 15px 4px 6px;
text-decoration:none;
font-weight:bold;
color:#765;
}
#header > ul a {width:auto;}
/* Commented Backslash Hack hides rule from IE5-Mac \*/
#header a {float:none;}
/* End IE5-Mac hack */
#header a:hover {
color:#333;
}
#home #nav-home, #news #nav-news,
#products #nav-products, #about #nav-about,
#contact #nav-contact {
background-position:0 -150px;
border-width:0;
}
#home #nav-home a, #news #nav-news a,
#products #nav-products a, #about #nav-about a,
#contact #nav-contact a {
background-position:100% -150px;
padding-bottom:5px;
color:#333;
}
#header li:hover, #header li:hover a {
background-position:0% -150px;
color:#333;
}
#header li:hover a {
background-position:100% -150px;
}
</code>
--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
> Yet you do not provide a test case URL.
Thing is...I don't have a page with the test on it :S I might get
something up by tomorrow, though
First fix the HTML so that it validates at <http://validator.w3.org>.
--
Chris F.A. Johnson <http://cfajohnson.com>
===================================================================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)
The source may not be invalid,
but it sure loooks funny with all the empty p-elements and text in between:
<div id="content">
Some text...
<p></p>
ff
<p></p>
dd
<p></p>
ff
<p></p>
dd
<p></p>
ff
<p></p>
dd
<p>...and then some...!</p>
</div>
How are you gonna style your text?
--
Rob
In the future you may want to avoid using CSS reserved keywords for ID
and CLASS names. E.g.: top, middle. Although it is legal, it's confusing.
> http://www.kvanum.no/test/ isn't hosted on a free service, and it now
> validates :)
Why are you doing this:
<div id="top">
<br>
<br>
<p>
</p><h1>logo</h1>
<p>
<br>
<br>
</p></div>
?
If you want to even temporarily make up a bit of height, do it via CSS.
You can use height, or margins or paddings.
--
dorayme