I am so angry at myself for having to post this here because I would like to think with my basic knowledge I would be able to sort this out but here goes: My wrapper div won't centre!!
I narrowed this down to the doctype.
I was using this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
which is the default DOCTYPE when starting a new page on Editplus...
Changed it to this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
which I got from the w3 website and it seems to work, although there is not a great difference between the two?
Really don't know why that first one didn't work, have always used that in the past.
Dunno for sure, but I certainly wouldn't use a frameset doctype unless you're using frames.
html4.0 was old news around 1999, so instead drop in html4.01 (transitional if you must):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
Strict would be better:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
Thanks Dave, that one works fine for me.
Can I just ask your opinion on something else quickly, I am using jQuery show/hide features on a list, so on loading the page in IE it gives you all that Active X control crap etc...
What would you do to ensure that the user has this enabled so they are viewing your page how it is meant to be viewed?
I narrowed this down to the doctype.
I was using this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
which is the default DOCTYPE when starting a new page on Editplus...
Changed it to this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
which I got from the w3 website and it seems to work, although there is not a great difference between the two?
Really don't know why that first one didn't work, have always used that in the past.
One is an HTML doctype that is missing the URI part: ""http://www.w3.org/TR/html4/frameset.dtd""
The other is a frameset doctype used with frame pages.
Centering:
Centering an element requires setting a width that is less than 100%, using a proper document type and using the CSS property: margin: 0 auto; This is done in the CSS that styles the element. Example:
Bookmarks