Moshambi
11-29-2007, 12:47 PM
so i am having a problem with a menu on the site im working on. whats happening is when i resize the window the items in the menu are being pushed down the page, kinda like they are stacking on top of eachother. i was wondering if it could possibly because i use the <UL>, <LI> tags to make my menu, and then style it in CSS. the same thing also happens to my content area of the site.
Here is a look at the HTML to better understand:
<html>
<title> Allen's Home Repair -> Home </title>
<head>
<link rel="stylesheet" type="text/css" href="skin.css" />
<div id="banner">
<center><img src="images/banner.gif" alt="Allen's Home Repair"/></center>
</div>
</head>
<body>
<center>
<div id="menu">
<ul>
<li><a href="index.html"> Home </a></li>
<li><a href="pictures.html"> Pictures </a></li>
<li><a href="jobrequest.html"> Job Request </a></li>
<li><a href="contact.html"> Contact </a></li>
</ul>
</div>
</center>
<center>
<div id="content">
<p> Welcome to the Allen's Home Repair website! </p>
</div>
</center>
</body>
</html>
And the CSS for styling:
#menu
{
margin-left: -19px;
}
#menu ul li
{
display: inline;
height: 20px;
width: 63px;
}
#menu ul li a
{
text-decoration: none;
color: black;
padding: 10px;
margin: 0px;
border: 1px solid black;
background-color: #d19347;
}
#menu a:link, a:visited
{
}
#menu a:hover, a:active
{
background-color: #c17518;
}
#content
{
text-align: left;
padding: 5px;
margin-top: -6px;
margin-left: 185px;
margin-right: 194px;
border: 1px solid black;
background-color: #d19347;
height: 75%;
}
#content a:link, a:visited
{
color: black;
}
#content a:hover, a:active
{
color: black;
background-color: #d19347;
}
body
{
background-image: url("images/background.gif");
}
i hope you can help and thanks!
Here is a look at the HTML to better understand:
<html>
<title> Allen's Home Repair -> Home </title>
<head>
<link rel="stylesheet" type="text/css" href="skin.css" />
<div id="banner">
<center><img src="images/banner.gif" alt="Allen's Home Repair"/></center>
</div>
</head>
<body>
<center>
<div id="menu">
<ul>
<li><a href="index.html"> Home </a></li>
<li><a href="pictures.html"> Pictures </a></li>
<li><a href="jobrequest.html"> Job Request </a></li>
<li><a href="contact.html"> Contact </a></li>
</ul>
</div>
</center>
<center>
<div id="content">
<p> Welcome to the Allen's Home Repair website! </p>
</div>
</center>
</body>
</html>
And the CSS for styling:
#menu
{
margin-left: -19px;
}
#menu ul li
{
display: inline;
height: 20px;
width: 63px;
}
#menu ul li a
{
text-decoration: none;
color: black;
padding: 10px;
margin: 0px;
border: 1px solid black;
background-color: #d19347;
}
#menu a:link, a:visited
{
}
#menu a:hover, a:active
{
background-color: #c17518;
}
#content
{
text-align: left;
padding: 5px;
margin-top: -6px;
margin-left: 185px;
margin-right: 194px;
border: 1px solid black;
background-color: #d19347;
height: 75%;
}
#content a:link, a:visited
{
color: black;
}
#content a:hover, a:active
{
color: black;
background-color: #d19347;
}
body
{
background-image: url("images/background.gif");
}
i hope you can help and thanks!