I'm just getting into using CSS and I'm having a problem getting Opera
to display a Navigation Bar in the same way as IE6. Can someone
please point me in the right direction?
The site I'm working on can be seen at
http://www.budbury.co.uk/itel/index.htm
In Opera 6.05 the Nav Bar image floats behind the content division that
follows the navbar.
In IE6 the image is displayed as part of the navbar division with the
content following after. (this is the behavior I want)
I think it is to do with using the Tantek Celik hack incorrectly, but
I'm not sure as I'm using O6.05. A few pointers would be appreciated.
Many thanks Robert
==================
This is the bit of HTML:
<div id="navbar">
<span class="orange"> Home</span>
<a href="telephony.htm">Telephony</a>
<a href="networking.htm">Networking</a>
<a href="cabling.htm">Structured Cabling</a>
<a href="contact.htm">Contact Us</a>
<span class="grey">CALL US</span><span
class="white"> 01225 787 300</span><br>
<img align=absmiddle src="images/navbar.jpg" width="735" height="154"
alt="Solution for Business Communications"> </div>
This is the part of CSS style sheet:
#navbar {
font-weight: bold;
font-size: 14px;
white-space: nowrap;
margin:0px 10px 0px 20px;
padding:0px 0px 0px 0px;
/* For IE5/Win's benefit height = [correct height] + [top padding] +
[top and bottom border widths] */
height:16px; /* 16px + 0px + 2px = 0px */
border-style:solid;
border-color:black;
border-width:1px 0px; /* top and bottom borders: 1px; left and right
borders: 0px */
line-height:16px;
background-color:#3a8bff;
/* Here is the ugly brilliant hack that protects IE5/Win from its own
stupidity.
Thanks to Tantek Celik for the hack and to Eric Costello for
publicizing it.
IE5/Win incorrectly parses the "\"}"" value, prematurely closing the
style
declaration. The incorrect IE5/Win value is above, while the correct
value is
below. See http://glish.com/css/hacks.asp for details. */
voice-family: "\"}\"";
voice-family:inherit;
height:18px; /* the correct height */
}
/* I've heard this called the "be nice to Opera 5" rule. Basically, it
feeds correct
length values to user agents that exhibit the parsing error exploited
above yet get
the CSS box model right and understand the CSS2 parent-child selector.
ALWAYS include
a "be nice to Opera 5" rule every time you use the Tantek Celik hack
(above). */
body>#Header {height:16px;}