Solved

Form Field Borders (Padding)

Posted on 2015-02-14
2
70 Views
Last Modified: 2015-02-15
See attached. I want to put a white border around the grey form field text areas.

Here is part of the html. I only added padding to a few of the fields to see if it works; it doesn't.

Name*: <input type="text" size="20" name="cname" style="color: #000; background-color : #efefef; padding: 5px;"><br>
                                                Address*: <input type="text" size="20" name="addr" style="color: #000; background-color : #efefef; padding: 5px;"><br>
                                                City*: <input type="text" size="10" name="city" style="color: #000; background-color : #efefef; padding: 5px;">, Zip*: <input type="text" size="5" name="zip" style="color: #000; background-color : #efefef; padding: 5px;" value="<? print $_POST['zip']; ?>"><br>
                                                Billing Address if different from Service Address:<br>
                                                Billing Address: <input type="text" size="20" name="baddr" style="color: #000; background-color : #efefef;"><br>
                                                Billing City: <input type="text" size="10" name="bcity" style="color: #000; background-color : #efefef;">, Billing Zip: <input type="text" size="5" name="bzip" style="color: #000; background-color : #efefef;"><br>
                                                Telephone*: <input type="text" size="10" name="phone" style="color: #000; background-color : #efefef;"><br>
                                                E-Mail*: <input type="text" size="30" name="email" style="color: #000; background-color : #efefef;"><br><br>
                                                Credit Card*: <input type="text" size="20" name="ccno" style="color: #000; background-color : #efefef;">
                                                Expiration Date*:&nbsp;Month:&nbsp;<select name="expmo" style="color: #000; background-color : #efefef; width: 50px;">

I am trying to use padding, but it doesn't work.

How can I do this?
payment-form.jpg
0
Comment
Question by:Richard Korts
  • 2
2 Comments
 
LVL 43

Accepted Solution

by:
Chris Stanyon earned 500 total points
ID: 40610659
Padding works inside an element. You want to use margins:

<input type="text" size="20" name="cname" style="color: #000; background-color : #efefef; margin: 5px;">
0
 
LVL 43

Expert Comment

by:Chris Stanyon
ID: 40610660
Alternatively, you could use the border:

<input type="text" size="20" name="cname" style="color: #000; background-color : #efefef; border: 1px solid white;">
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
css, html 5 42
Wrapper for APPs 9 76
css img-response wont work properly 7 26
Best way to minify CSS with out breaking it 7 35
Creating a CSS block that only applies to printing By default, all of your CSS applies to every possible view of your page - whether on screen, printed, landscape, touch-screen, or whatever.  You can, however, add CSS that only applies under certai…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question