CSS Help

Status
Not open for further replies.

swizcore

Wise, Aged Ars Veteran
180
Im having an issue with content positioning and site flow.
Specifically, the image of the two buildings at my link below is positioning completely differently in IE, Firefox and Safari.
Its correct in Firefox, too high and covering the navigation in Safari and of course, a cluster F in IE.
Any help is greatly appreciated.

http://www.nocfa.org/indev.html
 
They look the same to me in both but upon a 30 second inspection I see you're using the HTML DTD. If you really want browsers to "act the same" then you need to tell them your code will be compliant.

Here's your DTD:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

That's old. If you want to tell the browsers to stay out of 'quirks' old school mode then supply it with something newer. If you're not really familiar with HTML and CSS then try a transitional DTD:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

If you're good at using CSS up to W3 spec then try your hand at strict so all browsers will act extremely similarly toward your code:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 
Status
Not open for further replies.