DOCTYPE affects menu paddings

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
perldev
Mega User
Mega User
Posts: 115
Joined: Thu Aug 26, 2004 5:23 pm
Location: Chicago

DOCTYPE affects menu paddings

Post by perldev »

Example 1:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html lang="en">

Example 2:
<!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" xml:lang="en-US" lang="en-US">

In example 2, the menu padding doesn't work; but example 1 does. The only difference between 1 and 2 is the DOCTYPE.

How to fix the padding issue of example 2? Thanks in advance.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

I'm assuming Netscape and Firefox since my IE looks the same in both. For some reason, and I don't know what that is, if you put px in your menu style code Netscape will start showing the padding.

Code: Select all

padding="5px 10px 5px 10px";
The same is true in Firefox 1.0.2.

Ruth
perldev
Mega User
Mega User
Posts: 115
Joined: Thu Aug 26, 2004 5:23 pm
Location: Chicago

Post by perldev »

Hmm. It does look different in IE.
Image
perldev
Mega User
Mega User
Posts: 115
Joined: Thu Aug 26, 2004 5:23 pm
Location: Chicago

Post by perldev »

Ruth, you are right. When appending px, it works perfect. Thanks for your help!
guythomas
Advanced
Advanced
Posts: 10
Joined: Sat Jul 02, 2005 9:26 am

Re: DOCTYPE

Post by guythomas »

I find that specifing

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

Has an affect on the springout menus. They persist and don't withdraw gracefully. I had not noticed a problem until I tried in IE 8.

Question:
Are there any known IE 8 incompatibilities?

Guy
Post Reply