Denne webside er groft forældet idet jeg ikke har fået gjort noget som helt ved den i alt for lang tid.
For avancerede nørder burde der dog stadig være relevant information på siderne.
27/11-2004
This page illustrates the 'clear: both' bug in Opera.
The heading - Opera-Bug - ought to be centered on the page.
Instead it's displayed to the right of the submeny.
9/12-2004
Upon further observation of the behaviour, the behaviour observed actually seems to be a combination of two things:
- the
clear: both
is ignored in the <br>
- the
float: left
from the subMenu <a>
seems to be inherited by the <h1>
in the div#heading
These are the relevant pieces of css:
div#subMenu > a
{
text-align: center;
display: block;
float: left;
background-color: green;
color: white;
text-decoration: none;
margin-right: -1px;
border: 1px solid black;
border-top: 0px solid black;
padding: 5px 10px 5px 10px;
-moz-border-radius: 0px 0px 15px 15px;
}
div#heading
{
margin-bottom: 10px;
background: url(/grafik/constructhr.gif) bottom center no-repeat;
text-align: center;
height: 4em;
}
and the relevant piece of xhtml code:
<div id="subMenu">
<a href="/index/OperaBug/index">item 1</a>
<a href="/index/OperaBug/index">item 2</a>
<a href="/index/OperaBug/index">item 3</a>
<a href="/index/OperaBug/index">item 4</a>
<a href="/index/OperaBug/index">item 5</a>
<a href="/index/OperaBug/index">item 6</a>
<br style="clear: both;"/> <!-- seemingly ignored -->
</div>
<div id="heading">
<h1>Opera-Bug</h1>
</div>