Dora
24th February 09, 07:36 PM
Hi all,
This is a pretty simple site but having so much trouble with the navigation, it is all screwed up in ie, the mission button is under home, and the drop-down text wont show...
this is the html file
<!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>Aly Inc. Import and Export: Metal, textiles, agriculture, food, electrical, electronics</title>
<meta name="keyword" content="Aly, Aly inc, Hakim Safa, import, export, import and export, metal, food, textile, electrical, electric, electronics, laptop, cellphone, oil, sunflower oil, cooking oil, agriculture, construction materials" />
<meta name="description" content="Aly Inc. Import and Export" />
<link rel="stylesheet" href="style.css" type="text/css" />
<script language="JavaScript">
window.onload = function()
{
var lis = document.getElementById('cssdropdown').getElements ByTagName('li');
for(i = 0; i < lis.length; i++)
{
var li = lis[i];
if (li.className == 'headlink')
{
li.onmouseover = function() { this.getElementsByTagName('ul').item(0).style.disp lay = 'block'; }
li.onmouseout = function() { this.getElementsByTagName('ul').item(0).style.disp lay = 'none'; }
}
}
}
/* or with jQuery:
$(document).ready(function(){
$('#cssdropdown li.headlink').hover(
function() { $('ul', this).css('display', 'block'); },
function() { $('ul', this).css('display', 'none'); });
});
*/
</script>
</head>
<body>
<div id="background">
<div id="header">
<div id="navigation">
<ul>
<li id="home"><a href="index2.html"></a></li>
<ul id="cssdropdown">
<li class="headlink">
<a href="ms.html" id="ms"></a>
<ul>
<li><a href="ms.html">English</a></li>
<li><a href="msfr.html">Français</a></li>
<li><a href="mses.html">Español</a></li>
</ul>
</li><!--closes headlink-->
</li>
</ul><!--closes ul main-->
<li id="contact"><a href="contact.html"></a></li>
</ul>
</div><!--closes navigation-->
</div><!--closes headerms-->
<div id="content">
<embed src="images/index.swf" quality="high" wmode="opaque" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="956" height="523"></embed>
</div>
</div><!--closes background-->
<div id="sidebar">
</div>
</body>
</html>
here is the css code:
/* ------------------------------- */
/* RESET
/* ------------------------------- */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
:focus {outline: 0;}
body {line-height: 1;color: black;background: white;}
ol, ul {list-style: none;}
table {border-collapse: separate;border-spacing: 0;}
caption, th, td {text-align: left;font-weight: normal;}
.clear { clear: both; height: 20px;}
/* ------------------------------------ */
/* -------- LAYOUT ---------- */
/* ------------------------------------ */
body {
margin:0;
padding:0;
border: 0;
font-size: 100%;
background: #436029 url(images/background.jpg) repeat-x;
}
#header {
margin: 0 auto;
padding: 0;
width: 354px;
height: 221px;
background: url(images/index-banner.jpg) no-repeat;
}
#headerms {
margin: 0 auto;
padding: 0;
width: 375px;
height: 221px;
background:url(images/mission-banner.gif) no-repeat;
}
/* ------------------------------------ */
/* -------- NAVIGATION ---------- */
/* ------------------------------------ */
#navigation {
position: relative;
top: 187px;
left: 10px;
width: 354px;
height: 26px;
}
#navigation ul li {
margin-right: 10px;
display: block;
float: left;
}
#navigation ul li a {
display: block;
}
li#home a {
width: 120px;
height: 25px;
background:url(images/home.jpg) no-repeat;
display:block;
text-indent: -9999px;
}
li a#ms {
width: 73px;
height: 26px;
background:url(images/ms.jpg) no-repeat;
}
/* DROP DOWN MENU STYLES */
/* ~~~~~~~~~~~~~~~~~~~~~~~ */
li.headlink:hover ul {
display: block;
}
#cssdropdown, #cssdropdown ul {
list-style: none;
}
#cssdropdown, #cssdropdown * {
padding: 0;
margin: 0;
}
/* HEAD LINKS */
#cssdropdown li.headlink {
display: block;
width: 73px;
}
#cssdropdown li.headlink a {
display: block;
width: 100px;
padding: 0;
}
/* CHILD LISTS AND LINKS */
#cssdropdown li.headlink ul {
margin: 2px 0 0 -17px;
display: none;
font: normal .9em Georgia, sans-serif;
}
#cssdropdown li.headlink:hover ul {
display: block;
}
#cssdropdown li.headlink ul li a {
padding: 5px;
height: 17px;
color: #c0c0c0;
text-decoration: none;
text-align: center;
text-transform: lowercase;
border-bottom: 1px solid #475b30;
background: #32431F;
}
#cssdropdown li.headlink ul li a:hover {
color: #eee;
background: #3a4d26;
}
/* PRETTY STYLING */
#cssdropdown a {
color: #161F0C;
}
#cssdropdown ul li a:hover {
text-decoration: none;
}
/* CONTACT LINK */
/* ~~~~~~~~~~~~~~~~~~~~~~~ */
li#contact a {
margin-left: 50px;
position: relative;
top: 2px;
width: 78px;
height: 24px;
background:url(images/contact.jpg) no-repeat;
display:block;
text-indent: -9999px;
}
/* SPLASH AND CONTENT */
/* ~~~~~~~~~~~~~~~~~~~~~~~ */
#splash {
margin: 0 auto;
padding: 0;
width: 841px;
height: 540px;
}
#content {
margin: 10px auto 0 auto;
padding: 0;
width: 965px;
clear: both;
}
#content p {
font: .8em/1.2em Georgia, "Times New Roman", serif;
color: #BDC6BB;
text-align: justify;
}
#content h2 {
font: lighter 1.7em Georgia, "Times New Roman", serif;
color: #161F0C;
}
#content h3 {
font: 1.5em Helvetica, Arial, sans-serif;
color: #87af12;
}
/* SIDEBAR */
/* ~~~~~~~~~~~~~~~~~~~~~~~ */
#sidebar {
margin: 0 auto;
padding: 0;
position:relative;
top:80px;
width:934px;
height:199px;
}
I have a feeling it has to do with the positioning for the navigation div, or even the drop-down css but I haven't figured it out yet. Thank you for the help;)
This is a pretty simple site but having so much trouble with the navigation, it is all screwed up in ie, the mission button is under home, and the drop-down text wont show...
this is the html file
<!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>Aly Inc. Import and Export: Metal, textiles, agriculture, food, electrical, electronics</title>
<meta name="keyword" content="Aly, Aly inc, Hakim Safa, import, export, import and export, metal, food, textile, electrical, electric, electronics, laptop, cellphone, oil, sunflower oil, cooking oil, agriculture, construction materials" />
<meta name="description" content="Aly Inc. Import and Export" />
<link rel="stylesheet" href="style.css" type="text/css" />
<script language="JavaScript">
window.onload = function()
{
var lis = document.getElementById('cssdropdown').getElements ByTagName('li');
for(i = 0; i < lis.length; i++)
{
var li = lis[i];
if (li.className == 'headlink')
{
li.onmouseover = function() { this.getElementsByTagName('ul').item(0).style.disp lay = 'block'; }
li.onmouseout = function() { this.getElementsByTagName('ul').item(0).style.disp lay = 'none'; }
}
}
}
/* or with jQuery:
$(document).ready(function(){
$('#cssdropdown li.headlink').hover(
function() { $('ul', this).css('display', 'block'); },
function() { $('ul', this).css('display', 'none'); });
});
*/
</script>
</head>
<body>
<div id="background">
<div id="header">
<div id="navigation">
<ul>
<li id="home"><a href="index2.html"></a></li>
<ul id="cssdropdown">
<li class="headlink">
<a href="ms.html" id="ms"></a>
<ul>
<li><a href="ms.html">English</a></li>
<li><a href="msfr.html">Français</a></li>
<li><a href="mses.html">Español</a></li>
</ul>
</li><!--closes headlink-->
</li>
</ul><!--closes ul main-->
<li id="contact"><a href="contact.html"></a></li>
</ul>
</div><!--closes navigation-->
</div><!--closes headerms-->
<div id="content">
<embed src="images/index.swf" quality="high" wmode="opaque" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="956" height="523"></embed>
</div>
</div><!--closes background-->
<div id="sidebar">
</div>
</body>
</html>
here is the css code:
/* ------------------------------- */
/* RESET
/* ------------------------------- */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
:focus {outline: 0;}
body {line-height: 1;color: black;background: white;}
ol, ul {list-style: none;}
table {border-collapse: separate;border-spacing: 0;}
caption, th, td {text-align: left;font-weight: normal;}
.clear { clear: both; height: 20px;}
/* ------------------------------------ */
/* -------- LAYOUT ---------- */
/* ------------------------------------ */
body {
margin:0;
padding:0;
border: 0;
font-size: 100%;
background: #436029 url(images/background.jpg) repeat-x;
}
#header {
margin: 0 auto;
padding: 0;
width: 354px;
height: 221px;
background: url(images/index-banner.jpg) no-repeat;
}
#headerms {
margin: 0 auto;
padding: 0;
width: 375px;
height: 221px;
background:url(images/mission-banner.gif) no-repeat;
}
/* ------------------------------------ */
/* -------- NAVIGATION ---------- */
/* ------------------------------------ */
#navigation {
position: relative;
top: 187px;
left: 10px;
width: 354px;
height: 26px;
}
#navigation ul li {
margin-right: 10px;
display: block;
float: left;
}
#navigation ul li a {
display: block;
}
li#home a {
width: 120px;
height: 25px;
background:url(images/home.jpg) no-repeat;
display:block;
text-indent: -9999px;
}
li a#ms {
width: 73px;
height: 26px;
background:url(images/ms.jpg) no-repeat;
}
/* DROP DOWN MENU STYLES */
/* ~~~~~~~~~~~~~~~~~~~~~~~ */
li.headlink:hover ul {
display: block;
}
#cssdropdown, #cssdropdown ul {
list-style: none;
}
#cssdropdown, #cssdropdown * {
padding: 0;
margin: 0;
}
/* HEAD LINKS */
#cssdropdown li.headlink {
display: block;
width: 73px;
}
#cssdropdown li.headlink a {
display: block;
width: 100px;
padding: 0;
}
/* CHILD LISTS AND LINKS */
#cssdropdown li.headlink ul {
margin: 2px 0 0 -17px;
display: none;
font: normal .9em Georgia, sans-serif;
}
#cssdropdown li.headlink:hover ul {
display: block;
}
#cssdropdown li.headlink ul li a {
padding: 5px;
height: 17px;
color: #c0c0c0;
text-decoration: none;
text-align: center;
text-transform: lowercase;
border-bottom: 1px solid #475b30;
background: #32431F;
}
#cssdropdown li.headlink ul li a:hover {
color: #eee;
background: #3a4d26;
}
/* PRETTY STYLING */
#cssdropdown a {
color: #161F0C;
}
#cssdropdown ul li a:hover {
text-decoration: none;
}
/* CONTACT LINK */
/* ~~~~~~~~~~~~~~~~~~~~~~~ */
li#contact a {
margin-left: 50px;
position: relative;
top: 2px;
width: 78px;
height: 24px;
background:url(images/contact.jpg) no-repeat;
display:block;
text-indent: -9999px;
}
/* SPLASH AND CONTENT */
/* ~~~~~~~~~~~~~~~~~~~~~~~ */
#splash {
margin: 0 auto;
padding: 0;
width: 841px;
height: 540px;
}
#content {
margin: 10px auto 0 auto;
padding: 0;
width: 965px;
clear: both;
}
#content p {
font: .8em/1.2em Georgia, "Times New Roman", serif;
color: #BDC6BB;
text-align: justify;
}
#content h2 {
font: lighter 1.7em Georgia, "Times New Roman", serif;
color: #161F0C;
}
#content h3 {
font: 1.5em Helvetica, Arial, sans-serif;
color: #87af12;
}
/* SIDEBAR */
/* ~~~~~~~~~~~~~~~~~~~~~~~ */
#sidebar {
margin: 0 auto;
padding: 0;
position:relative;
top:80px;
width:934px;
height:199px;
}
I have a feeling it has to do with the positioning for the navigation div, or even the drop-down css but I haven't figured it out yet. Thank you for the help;)