Jump to content

Outlines, Input forms, and buttons


kuran

Recommended Posts

Apologies for the weird title, I tried to be as descriptive as possible.I made a simple web form, and for layout purposes I decided to have a 2px border around the input forms. The problem is that I want to use an image as my button graphic, and it automatically places a border around this image! Even if I specify 'border: 0' in the bolded part of the code.Here is what goes in the html:

<div id="form"><form action="contact.php" method="post"><div class="columnleftform">Name<br> <input type="text" name="yourname" /> <br><br>E-mail<br> <input type="text" name="email" /><br><br>Subject<br> <input type="text" name="subject" /><br /></p></div><div class="columnrightform">Message<br /><textarea name="comments" rows="12" cols="70"></textarea></p><p>[b]<input value="Submit" type="image" src="images/submitbutton.png" width="104" height="46" >[/b]</p></div>

This is the CSS associated:

input {background-color: #F4EFE8;border: 2px solid #E2DCD7;font-family: georgia;font-size: 18px;color: #555555;}textarea {background-color: #F4EFE8;border: 2px solid #E2DCD7;font-family: georgia;font-size: 18px;color: #555555;}

How do I fix this?Thanks for any help! If you need more information, or a link to the website, I will upload the current version.

Link to comment
Share on other sites

I'd suggest adding a class to the submit button and then removing the border from this class in the CSS.So change your button to something like:

<input value="Submit" type="image" src="images/submitbutton.png" width="104" height="46" class="submit">

And then add to your CSS:

input.submit:{border-width: 0;}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...