technoknow
Technical User
I have an image, "nav_table.gif" that I'm trying to get the text link images "companyLink.gif" and "portfolioLink.gif" to line up on top of. The links should be on the first 2 lines. No big deal right? It looks right in FF but not in IE 6. Here is the HTML
And here is the CSS:
I guess I'm just not understanding this CSS stuff.
I've read about relative positioning keeping the document flow normal. But what is the normal flow? I can get this to work fine with absolute positioning but after I line up all of my images (about 12 or so) I start having trouble getting things to look right.
Why does IE put the "Company" link in the right place (in first place) but then put "Portfolio" down to the 3rd line?
Why does "top" have to be a negative number to get the links in the right place?
TechNoKnow
Once upon a midnight dreary, while I pondered, weak and weary, over many a quaint and curious volume of forgotten code.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"[URL unfurl="true"]http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">[/URL]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1" />
<title>PilgrimPage - Company Information</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<style type="text/css">
<!--
@import url("style1Working.css");
-->
</style>
</head>
<body>
<!-- This is the main container for the page-->
<div id="container">
<!--Navigation lines -->
<div id="navLines"></div>
<!--navigation links -->
<a href="company.html"><p class="company_link"></p></a>
<a href="portfolio.html"><p class="portfolio_link"></p></a>
</div>
Code:
/* This is the main container */
#container {
position: relative;
left: 25%;
top: 0px;
width: 670px;
height: 900px;
}
/* navigation */
#navLines {
background: url(images/nav_table.gif) no-repeat;
position: relative;
left: 0px;
top: 10px;
width: 82px;
height: 97px;
z-index: 0;
/* Navigation Links */
p.company_link {
background: url(images/companyLink.gif) no-repeat;
position: relative;
margin: 0;
left: 10px;
top: -82px;
width: 57px;
height: 9px;
cursor: hand;
z-index: 1;
}
p.portfolio_link
{
background: url(images/portfolioLink.gif) no-repeat;
position: relative;
margin: 0;
left: 10px;
top: -75px;
width: 64px;
height: 9px;
cursor: hand;
z-index: 1;
}
I've read about relative positioning keeping the document flow normal. But what is the normal flow? I can get this to work fine with absolute positioning but after I line up all of my images (about 12 or so) I start having trouble getting things to look right.
Why does IE put the "Company" link in the right place (in first place) but then put "Portfolio" down to the 3rd line?
Why does "top" have to be a negative number to get the links in the right place?
TechNoKnow
Once upon a midnight dreary, while I pondered, weak and weary, over many a quaint and curious volume of forgotten code.