Navigator/Explorer Comparison


coloring text backgrounds

how NN and IE handle coloring text backgrounds

page 1 of 4


table of contents

coloring header backgrounds

Below is the CSS code for coloring header element backgrounds.

<h1 style="background:blue;">
this is a header 1</h1>
<h1 style="background:blue;"> this is another header 1</h1>

we see in NN4.7we see in IE5.0
NN4.7 coloring background of a header element IE5.0 coloring background of a header element
we see in NN6.0 
NN6.0 coloring background of a header element

NN4.7 will only color the text from beginning to end of the text. IE5.0 and NN6.0 run the color all the way over to the right side of the page.

Let's add a WIDTH value. The code is below.

<h1 style="background:blue;
width:3.0in;">this is a header 1</h1>
<h1 style="background:blue; width:3.0in;">this is another header 1</h1>

we see in NN4.7:we see in IE5.0:
NN4.7 forcing a break in text when the WIDTH value is too small IE5.0 forcing a break in text when the WIDTH value is too small
we see in NN6.0: 
NN6.0 forcing a break in text when the WIDTH value is too small

NN4.7 and IE5.0 and NN6.0 respond to the WIDTH value in different ways. All will wrap text to fit the WIDTH, but NN4.7 will not color the full WIDTH. Instead NN4.7 will only color directly behind the text. Let's turn to DIV tags and regular text to see if we can find a solution to making IE5.0 and NN6.0 and NN4.7 render colored backgrounds the same way.

§
top

coloring text backgrounds with divs

One way to color backgrounds is to use DIV elements. DIV tags are used to divide web pages into formatted areas. One kind of formatted area designers look for is a colored box. The code for coloring behind text by setting the background color in DIV tags is below.

<div style="background:red;">
some text<br>
some more text of a different length<br>
</div>

we see in NN4.7:we see in IE5.0:
NN4.7 coloring behind text with a div IE5.0 coloring behind text with a div
we see in NN6.0: 
NN6.0 coloring behind text with a div

Again IE5.0 and NN6.0 color the background of the text all the way to the right margin while NN4.7 only colors behind the text, and does not extend the coloring past the end of the text

§
top

divs with width value

Let's try to make a box by setting the WIDTH value of a DIV.

Here is the code to create a box with a DIV

<div style="width:2.0in;background:green;">
here is a box<br>
here is more stuff<br>
here is a even more stuff, so much it'll definitely wrap </div>

we see in NN4.7:we see in IE5.0:
NN4.7 rending a div with a WIDTH value IE5.0 rending a div with a WIDTH value
we see in NN6.0: 
NN6.0 rending a div with a WIDTH value

NN4.7 does not respond to the WIDTH value in a predictable way, yet IE5.0 and NN6.0 do. Again, NN4.7 only colors directly behind the text, yet will wrap text to fit the WIDTH value.

§
top

resources
Four Corners Effective Banners This site is dedicated to the study of all things banner-like, including: banners, click-through ratios, banner advertising, banner link exchanging, etc. You'll learn how to improve your banners and increase your site traffic.
Free Site Tools A webmaster's directory of free resources to help find about everything to build, maintain and promote your website. 1000+ Resources.
Free Webmaster Tools and Resources Your center for absolutely free high quality webmaster resources and tools to manage your web site. All utilities, programs and sites are carefully selected.
EZSearches.com Want access to free email, auctions, shopping bargains and more?  Try EZSearches.com
Certified Nerds A great computer repair company that does in-home visits or drop-off.
Cool Candle Shoppe Candles Place is a great site that if you're looking to purchase some great wax sticks, I'd go here.