Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Setting Padding to <input> in %
Old 04-23-2012, 06:11 AM Setting Padding to <input> in %
pealo86's Avatar
Super Spam Talker

Posts: 878
Name: Matt Pealing
Location: England, north west
Trades: 0
I have a form on the following page:
http://bit.ly/IqsngY

and I am trying to set the width / padding of the form fields in % like so:
Code:
form-01, .form-02 {
    overflow: hidden;
    width: 50%;
    margin: 1.42857142857143em; /* 20px / 14px */
}

.form-02 p {
    width: 100%;
}

.form-01 input, .form-01 textarea, .form-01 select,
.form-02 input, .form-02 textarea, .form-02 select {
    width: 90%;
    padding: 0.35714285714286em 5%; /* 5px / 14px, 10px / 14px */
    background: #d4d4d4;
    border: none;
}
Yet I find the % padding is just completely ignored, am I doing something wrong?
__________________

Please login or register to view this content. Registration is FREE
pealo86 is offline
Reply With Quote
View Public Profile Visit pealo86's homepage!
 
 
Register now for full access!
Old 04-23-2012, 06:28 AM Re: Setting Padding to <input> in %
lizciz's Avatar
Super Spam Talker

Posts: 845
Name: Mattias Nordahl
Location: Sweden
Trades: 0
There is padding when I look at it. Using Chrome. In fact, if I look at the actual computed metrics in Chrome, there is an 5px (0.35714285714286em) padding at the top and bottom, and a 18px (5%) padding to the left and right.
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
lizciz is offline
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Old 04-23-2012, 04:13 PM Re: Setting Padding to <input> in %
miki86's Avatar
Extreme Talker

Posts: 239
Location: print_r($serbia);
Trades: 0
I checked with Opera, Firefox, Chrome and IE9.
All browsers display padding you set.
miki86 is offline
Reply With Quote
View Public Profile
 
Old 04-24-2012, 04:05 AM Re: Setting Padding to <input> in %
pealo86's Avatar
Super Spam Talker

Posts: 878
Name: Matt Pealing
Location: England, north west
Trades: 0
Hmmm that's bizarre, I'm guessing the problem must just be with FF for Mac then! Are you both testing on Windows by any chance?
__________________

Please login or register to view this content. Registration is FREE
pealo86 is offline
Reply With Quote
View Public Profile Visit pealo86's homepage!
 
Old 04-24-2012, 04:10 AM Re: Setting Padding to <input> in %
miki86's Avatar
Extreme Talker

Posts: 239
Location: print_r($serbia);
Trades: 0
Yeah im on windows
miki86 is offline
Reply With Quote
View Public Profile
 
Old 04-24-2012, 06:30 AM Re: Setting Padding to <input> in %
lizciz's Avatar
Super Spam Talker

Posts: 845
Name: Mattias Nordahl
Location: Sweden
Trades: 0
Quote:
Originally Posted by pealo86 View Post
Hmmm that's bizarre, I'm guessing the problem must just be with FF for Mac then! Are you both testing on Windows by any chance?
Yes, I was on Windows. I just tested it on my mac aswell and there is indeed no padding on Firefox. Works normally on Chrome and Safari, though.
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
lizciz is offline
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Reply     « Reply to Setting Padding to <input> in %
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.20683 seconds with 11 queries