Solved

Form Field Borders (Padding)

Posted on 2015-02-14
2
74 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Unordered lists (HTML ul tags) are very handy to create menus of all types, shapes and sizes.  All it takes is a little knowledge of CSS and the possibilities are endless. First off, you should know the general format for menus created using the …
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

737 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