
Originally Posted by
FordCorsair
have a problem with the following, in that whilst it looks how I want it to on Windows IE, on a Mac browser (Safari or IE5) all the alignment of my divs go wrong.
That's not a particularly informative description, but perhaps you're seeing what I do in Firefox.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Developing in 'Quirks' mode it's a good idea, particularly when using IE to evaluate your work. Use a standards-compliant browser like Firefox or Opera, and author documents that trigger 'Standards' mode rendering.
If you must use a Transitional document type declaration, include the system identifier:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
The type attribute is required, and should have the value, "text/css".
.headings {
font-family: Verdana, Arial, Helvetica, sans-serif;
Using Verdana is generally a bad idea. Don't use it.
Don't specify font sizes in pixels. IE users cannot resize it due to a bug, and this is a potential usability problem. Use percentages instead.
margin-right: 20px;
margin-left: 20px;
[...]
width: 100%;
border-top: none;
border-right: none;
border-bottom: 1px solid #00cccc;
border-left: none;
[...]
padding-top: 3px;
padding-bottom: 3px;
padding-left: 4px;
The width property specifies the width of the content box. Padding, borders and margins are then added to it. At 100% width, this will cause the element to overflow its container. Block-level elements will expand, by default, so that they will fill their containers.
background-position: center bottom;
Why a background-position declaration when you don't have background images?
Percentage values with the height property only apply when the containing block for an element has an explicitly specified height (not the case, here). It will be interpreted as the auto value otherwise.
margin-top: 5px;
margin-bottom: 5px;
would suffice. The same for padding-top/padding-bottom.
border-top: 1px none #00CCCC;
border-right: 1px none #00CCCC;
border-bottom: 1px solid #00CCCC;
border-left: 1px none #00CCCC;
The only declaration that needs to be there is the third (border-bottom).
padding-left: 24px;
padding-right: 24px;
The margin-left/margin-right combination in the previous rule could be similarly reduced.
Unless the content would be floated by another, less specific rule, this is unnecessary.
<body bgcolor="336666" topmargin="0">
All hex-specified colour values must begin with a hash (#) symbol. Both of those attributes could, and should, be replaced with:
Code:
body {
background: #336666;
color: #ffffff;
margin-top: 0;
}
<div class="headings">Welcome</div>
Headings should be marked-up as headings, not semantically-neutral block-level elements. If you don't like how a level-1 (h1) heading looks, style it with CSS.
<img src="images/FLASH%20gallery/Croatia_EI/images/Croatia397_1.jpg" width="800" height="357" class="imagebox">
If none of these images are content (they're for decoration), include an empty alt attribute (alt="").
Rather than add a class attribute to each img element, use the document structure in the selector.
Code:
.imageboundingbox img {
/* ... */
}
not
Code:
.imagebox {
/* ... */
}
<font color="#FFFF00"><a ...>
Never use the font element. Ever. Style the link.
<div class="designby"> (¯`·._.·´[ website design by :: <a href="mailto:dom@domcoleman.co.uk" class="domcoleman">www.domcoleman.co.uk</a> ]`·._.·´¯)</div>
ASCII art in HTML isn't cute. Use images if you want that sort of decoration.
Perhaps the example I've prepared will look more like your intentions. I should hope so as even IE4 displays it reasonably sanely.
The visited link colour should be different than the one I used there as the contrast is too low.
Mike
Bookmarks