Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Absolute positioning and doctype

Status
Not open for further replies.

ice78991

Programmer
Nov 20, 2006
216
I have been setting the offsets of elements using javascript ( to move tables around the page) These elements are absolutely positioned.

If I include
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "
in my page then it does not work. If I remove it its fine. Is it ok to leave it out altogether?
 
Is it ok to leave it out altogether?

Not if you want your page to behave the same across all pages.

I suggest that you rewrite your script to accommodate the doctype, not remove the doctype to accomodate the script. If you're having problems perhaps you can post the relevant snippet of code so that we can assist you to make it work with the doctype.

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top