M
Mark
Hi
I'm working on a website with a similar feel to this:
http://www.oreilly.com/catalog/9780596515836/
What I have so far can be viewed here:
http://www.lester1.eclipse.co.uk/test/
(I'm going to change the colours, honest!)
This appears to render identically in FF 2, Opera 9, Safari 3.0.3 and
SeaMonkey 1.1.5 (all Windows), with each of these browsers applying
margin to the top of the h2 element at the beginning of the content, and
to the bottom of the p element at the end of the content, creating a
nice bit of whitespace between the subnav and the footer respectively.
However, for some reason, IE5 and IE6 do not apply this margin, so the
text is directly adjacent to the subnav and the footer. Is this because
I have done something to trigget an IE bug?
I've floated both the navbar and subnav divs left and given them a width
of 100% to prevent them from collapsing once I floated the a elements
inside -- I then clear these with the following div, mbody.
I have given mbody a minimum height to prevent the container from
becoming too short on pages with sparse content. In FF etc., mbody
appears to be 300pixels high no matter what, with the floated sidebar
and content divs growing out of it, but in IE5/6, mbody stretches to
contain the divs. Why is this? I've demonstrated this by putting a pinky
background colour on the mbody div.
Finally, I saw this technique somewhere as a way to have a graphical
logo while still having a h1 element for SEO purposes:
<h1><a href="homepage"><span>My company name</span></a></h1>
You put display:block on the a, give it a fixed pixel width to match
your logo image, then use the logo as a background for the a element.
You then put a display:none on the a span to hide the text.
As well as this, I've noticed that some sites use text-indent: -9999px
on the span instead of display:none but this has the side effect that
the dotted border you get when clicking the logo in Firefox stretches
all the way to the left edge of the viewport (although the hotspot is
still constrained to the image).
Are any of you using these techniques? Are they considered OK?
I'm working on a website with a similar feel to this:
http://www.oreilly.com/catalog/9780596515836/
What I have so far can be viewed here:
http://www.lester1.eclipse.co.uk/test/
(I'm going to change the colours, honest!)
This appears to render identically in FF 2, Opera 9, Safari 3.0.3 and
SeaMonkey 1.1.5 (all Windows), with each of these browsers applying
margin to the top of the h2 element at the beginning of the content, and
to the bottom of the p element at the end of the content, creating a
nice bit of whitespace between the subnav and the footer respectively.
However, for some reason, IE5 and IE6 do not apply this margin, so the
text is directly adjacent to the subnav and the footer. Is this because
I have done something to trigget an IE bug?
I've floated both the navbar and subnav divs left and given them a width
of 100% to prevent them from collapsing once I floated the a elements
inside -- I then clear these with the following div, mbody.
I have given mbody a minimum height to prevent the container from
becoming too short on pages with sparse content. In FF etc., mbody
appears to be 300pixels high no matter what, with the floated sidebar
and content divs growing out of it, but in IE5/6, mbody stretches to
contain the divs. Why is this? I've demonstrated this by putting a pinky
background colour on the mbody div.
Finally, I saw this technique somewhere as a way to have a graphical
logo while still having a h1 element for SEO purposes:
<h1><a href="homepage"><span>My company name</span></a></h1>
You put display:block on the a, give it a fixed pixel width to match
your logo image, then use the logo as a background for the a element.
You then put a display:none on the a span to hide the text.
As well as this, I've noticed that some sites use text-indent: -9999px
on the span instead of display:none but this has the side effect that
the dotted border you get when clicking the logo in Firefox stretches
all the way to the left edge of the viewport (although the hotspot is
still constrained to the image).
Are any of you using these techniques? Are they considered OK?