Jump to content
xisto Community
Pusher

Xhtml Input Field Problem

Recommended Posts

Hi,
i use XHTML Strict and CSS, making one site. Here's some CSS code :

.LoginFromField {margin : 9px 3px 0 3px;width : 120px;height : 18px;float : left;color : #666;background-image : url(./FormFieldDefaultBg.gif);background-repeat : repeat;font-family : Verdana, Helvetica, sans-serif;font-size : 12px;border : 1px solid #aaa;}

XHTML code:

<?xml version="1.0" encoding="windows-1251"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://forums.xisto.com/no_longer_exists/ lang="en" xml:lang="en" xmlns="http://forums.xisto.com/no_longer_exists/ HERE...</title><style type="text/css" media="all">@import "./style.css";</style></head><body><div id="PrimalDiv"><div id="LeftCell"><div id="NavigationMenuDiv">...NAV LINKS HERE...</div></div><div id="RightCell"><div id="ContentsDiv">...TEXT...TEXT...TEXT...TEXT....<br /><br /><div id="SmallFormDiv"><form action="login.php" method="post" id="LoginForm"><p><br /><input type="text" name="Name" id="Name" value="User" class="LoginFromField" title="" /> <input type="password" name="Password" id="Password" value="Password" class="LoginFromField" title="" /> <input type="submit" value="Enter" class="LoginFromButton" title="" /></p></form></div></div></div></div></body></html>

With IE and Opera everything is fine, but FF makes the height of input field's, 18px(as defined in CSS code) + 2px(top and bottom border). When i delete the XHTML declaration, FF shows it like IE does. Do you have any suggestions, how can i fix that?

Sorry if i have mistakes, but english isn't my native language, i am still a learner. :lol:

Share this post


Link to post
Share on other sites

<?xml version="1.0" encoding="windows-1251"?>

Having the xml declaration in the first line of the page will put IE into Quirks mode.

I'd suggest removing it and see what happens. You might need to adjust the heights a little, or margins/padding, etc, but get all the Browsers into Standards Mode will/should make it easier to control.

Quirks Mode is a crap shoot. You never know what you will be able to control or how.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.