Hi All,
Yes ... I am a nOOb still.
Ok I have read up on Liquid CSS design. I am trying to get my page to display well regardless of broswer and resolution.
Here is what I have so far:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Web Page</title>
<style type="text/css">
body
{
margin: 0;
padding: 0;
}
#header {
height: 100px;
background-color: #666;
margin-bottom: 5px;
}
#gutter
{
float: left;
width: 1%;
height: 1px;
}
#col1
{
float: left;
width: 20%;
height: 100px;
background-color: #999;
}
#col2
{
float: left;
width: 77%;
height: 100px;
margin-left: 1%;
background-color: #999;
}
#nav, #nav ul { /* all lists */
padding: 0;
margin: 0;
list-style: none;
float : left;
width : 11em;
}
#nav li { /* all list items */
position : relative;
float : left;
line-height : 1.25em;
margin-bottom : -1px;
width: 11em;
}
#nav li ul { /* second-level lists */
position : absolute;
left: -999em;
margin-left : 11.05em;
margin-top : -1.35em;
}
#nav li ul ul { /* third-and-above-level lists */
left: -999em;
}
#nav li a {
width: 11em;
width : 10em;
display : block;
color : black;
font-weight : bold;
text-decoration : none;
background-color : white;
border : 1px solid black;
padding : 0 0.5em;
}
#nav li a:hover {
color : red;
background-color : black;
}
#nav li:hover ul ul, #nav li:hover ul ul ul, #nav li.sfhover ul ul, #nav li.sfhover ul ul ul {
left: -999em;
}
#nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li.sfhover ul, #nav li li.sfhover ul, #nav li li li.sfhover ul { /* lists nested under hovered list items */
left: auto;
}
#content {
margin-left : 12em;
}
</style>
<script type="text/javascript"><!--//--><![CDATA[//><!--
sfHover = function() {
var sfEls = document.getElementById("nav").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
sfEls.onmouseover=function() {
this.className+=" sfhover";
}
sfEls.onmouseout=function() {
this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
//--><!]]></script>
</head>
<body>
<div id="header"></div>
<div id="gutter"></div>
<div id="Col1">
<ul id="nav">
<li><a href="#">Menu 1</a>
<ul>
<li><a href="#">SubMenu 1</a></li>
</ul>
<li><a href="#">Menu 2</a>
<ul>
<li><a href="#">SubMenu 2</a></li>
<li><a href="#">SubMenu 2</a></li>
</ul>
<li><a href="#">Menu 3</a>
<ul>
<li><a href="#">SubMenu 3</a></li>
<li><a href="#">SubMenu 3</a></li>
<li><a href="#">SubMenu 3</a></li>
</ul>
</div>
<div id="col2"></div>
<div id="footer"></div>
</body>
</html>
My columns etc seem to work fine, but I just can't tweak the menu to scale as well.
Any thoughts?
Yes ... I am a nOOb still.
Ok I have read up on Liquid CSS design. I am trying to get my page to display well regardless of broswer and resolution.
Here is what I have so far:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Web Page</title>
<style type="text/css">
body
{
margin: 0;
padding: 0;
}
#header {
height: 100px;
background-color: #666;
margin-bottom: 5px;
}
#gutter
{
float: left;
width: 1%;
height: 1px;
}
#col1
{
float: left;
width: 20%;
height: 100px;
background-color: #999;
}
#col2
{
float: left;
width: 77%;
height: 100px;
margin-left: 1%;
background-color: #999;
}
#nav, #nav ul { /* all lists */
padding: 0;
margin: 0;
list-style: none;
float : left;
width : 11em;
}
#nav li { /* all list items */
position : relative;
float : left;
line-height : 1.25em;
margin-bottom : -1px;
width: 11em;
}
#nav li ul { /* second-level lists */
position : absolute;
left: -999em;
margin-left : 11.05em;
margin-top : -1.35em;
}
#nav li ul ul { /* third-and-above-level lists */
left: -999em;
}
#nav li a {
width: 11em;
width : 10em;
display : block;
color : black;
font-weight : bold;
text-decoration : none;
background-color : white;
border : 1px solid black;
padding : 0 0.5em;
}
#nav li a:hover {
color : red;
background-color : black;
}
#nav li:hover ul ul, #nav li:hover ul ul ul, #nav li.sfhover ul ul, #nav li.sfhover ul ul ul {
left: -999em;
}
#nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li.sfhover ul, #nav li li.sfhover ul, #nav li li li.sfhover ul { /* lists nested under hovered list items */
left: auto;
}
#content {
margin-left : 12em;
}
</style>
<script type="text/javascript"><!--//--><![CDATA[//><!--
sfHover = function() {
var sfEls = document.getElementById("nav").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
sfEls.onmouseover=function() {
this.className+=" sfhover";
}
sfEls.onmouseout=function() {
this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
//--><!]]></script>
</head>
<body>
<div id="header"></div>
<div id="gutter"></div>
<div id="Col1">
<ul id="nav">
<li><a href="#">Menu 1</a>
<ul>
<li><a href="#">SubMenu 1</a></li>
</ul>
<li><a href="#">Menu 2</a>
<ul>
<li><a href="#">SubMenu 2</a></li>
<li><a href="#">SubMenu 2</a></li>
</ul>
<li><a href="#">Menu 3</a>
<ul>
<li><a href="#">SubMenu 3</a></li>
<li><a href="#">SubMenu 3</a></li>
<li><a href="#">SubMenu 3</a></li>
</ul>
</div>
<div id="col2"></div>
<div id="footer"></div>
</body>
</html>
My columns etc seem to work fine, but I just can't tweak the menu to scale as well.
Any thoughts?
















