Browser Weirdities

By Oli
At 12:32 AM · Sunday, 18 May · 2003
To CSS · Coding · HTML

These observations on Netscape Navigator 4.7 (Mac) and some other browsers’ weirdities were made while building a Mie University Center for International Students template. The template layout is table-based but uses CSS extensively, and doesn’t contain nested tables. I haven’t fully investigated these things, they’re just notes so I don’t forget.

Setting a {border: none;} on headings <h1-7> is a bad thing - the heading takes up more space, pushing stuff off the screen to the right of it.

Changing a <tr> from having an HTML-declared bgcolor to having a class with the same {background-color: ;} caused space to open above the table, although the cell is the second row, and although the row above uses a class. It might be because the class I added has padding and a margin.

Update: it was caused by setting a CSS margin or padding value (padding-[side] is ok). If you set two sides a small space appears, three and the space gets bigger.

Changing the charset to utf-8 makes NN4 render most text with white backgrounds (the breadcrumbs text is ok - huh? no obvious reason at all). Any pale text becomes unreadable. Japanese text is not displayed. If the file is saved as a unicode file (as well as specifying the charset as utf-8), blank space and a question mark are added to the top of the page (the mystery extra line seen in other browsers). If you want Japanese in a NN4 page, you have to use a Japanese charset, like shift-jis, or make pixel-font graphics (depending on whether your audience is people using Japanese or Western browsers).

Setting margin or padding on a right-hand table cell seems to move the whole row down.

If you want tables to be flush to the edge of the browser in NN4, you need to set marginwidth and marginheight to 0 on the body tag. These are non-standard HTML tags (NN only), so your page won’t validate after doing this. topmargin, bottommargin, leftmargin, and rightmargin (other NN4-invented body tags) aren’t needed, perhaps because of marginwidth/height, perhaps because of my {margin: 0; padding: 0;} CSS settings for body.

MSIE 5.2 makes space to the left of ul using margin, Safari does by using padding. Set both or you’ll see big differences.

NN4 can display black backgrounds on tables if HTML bgcolor isn’t set. PC IE 5.5 can if both bgcolor and color aren’t set.

PC IE 5 still seems to draw borders on tables even if the table tag declares border=0. This might be drawn on td elements. Have tried to counter by declaring {border: none;} in stylesheet, but have yet to check if it’s worked.

Discussion...

Comments (0)