Solved

Form Field Borders (Padding)

Posted on 2015-02-14
2
69 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

920 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now