Jump to content

[SOLVED] Firefox Help


popcornplya

Recommended Posts

For the first time, something works in IE but not in Firefox..

 

Anyway, here is my problem..

form.jpg

 

Submit button text is not aligned correctly.

 

My 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" xml:lang="en" lang="en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Form</title>
<style type="text/css">
p,form {
margin:0;
padding:0;
}
#contact {
width:500px;
font:12px Arial, Helvetica, sans-serif
}
#contact label {
color:#666;
}
#contact label span {
color:#F00;
}
#contact p {
margin:5px 0 5px;
}
#contact .contact_text, #contact .contact_textarea {
width:100%;
border:1px solid #CCC;
padding:5px;
background:url('form_bg.png') repeat-x;
}
#contact .contact_submit {
background:url('form_button.png') no-repeat;
width:139px;
height:21px;
border:0 none;
color:#FFF;
}
#contact .contact_textarea {
height:150px;	
}
</style>
</head>

<body>
<div id="contact">
<label>Recipient's Name: <span>*</span></label>
<p>
	<input type="text" class="contact_text" />
</p>
<label>Subject:</label>
<p>
	<input type="text" class="contact_text" />
</p>
<label>Message:</label>
<p>
	<textarea class="contact_textarea"></textarea>
</p>
<p>
	<input type="submit" class="contact_submit" value="Send Message" />
</p>
</div>
</body>
</html>

Any help is appreciated

Link to comment
Share on other sites

I've had trouble getting text to align properly inside of images when viewing them in firefox and IE as well. It's hard for me to mess with this since I don't have your submit button image. Your code seems fine.

 

Have you ever tried using the:

 

* {margin: 0; padding:0}

 

selector before? This will set everything on your page to 0 though, p, h1, form, etc... But I find this helps a lot with browser padding and margin issues especially with aligning text inside of small images.

 

Andrew

 

 

Link to comment
Share on other sites

Change this:

#contact .contact_submit {
   background:url('form_button.png') no-repeat;
   width:139px;
   height:21px;
   border:0 none;
   color:#FFF;
}

 

To this:

 

#contact .contact_submit {
   background:url('form_button.png') no-repeat;
   width:139px;
   height:21px;
   border:0 none;
   color:#FFF;
   line-height: 21px;
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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.