![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
hi, I've been noticing lately that padding property is ADDING to dimensions of element, this is causing me lots of difficulties.. if for example I have this: div class="divMore" align="right"><a href="">Read More</a></div and in css: .divMore {background-image:url(images/bg_more.jpg); background-repeat:no-repeat; height:40px; padding-top:10px;} it ADDS 10px to HEIGHT of this element, making it not 40px high, but 50px high.. this is not how padding property is supposed to work.. |
#3
| |||
| |||
|
|
hi, I've been noticing lately that padding property is ADDING to dimensions of element, this is causing me lots of difficulties.. if for example I have this: div class="divMore" align="right"><a href="">Read More</a></div and in css: .divMore {background-image:url(images/bg_more.jpg); background-repeat:no-repeat; height:40px; padding-top:10px;} it ADDS 10px to HEIGHT of this element, making it not 40px high, but 50px high.. this is not how padding property is supposed to work.. my understanding is padding puts padding between edge of element and content of element, it's not supposed to ADD to DIMENSION of element.. this is causing me difficulties.. please, what am I missing...thank you very much.. |
#4
| |||
| |||
|
|
In article <fihv6t$k77$1 (AT) aioe (DOT) org>, maya <maya778899 (AT) yahoo (DOT) com wrote: hi, I've been noticing lately that padding property is ADDING to dimensions of element, this is causing me lots of difficulties.. if for example I have this: div class="divMore" align="right"><a href="">Read More</a></div and in css: .divMore {background-image:url(images/bg_more.jpg); background-repeat:no-repeat; height:40px; padding-top:10px;} it ADDS 10px to HEIGHT of this element, making it not 40px high, but 50px high.. this is not how padding property is supposed to work.. my understanding is padding puts padding between edge of element and content of element, it's not supposed to ADD to DIMENSION of element.. this is causing me difficulties.. please, what am I missing...thank you very much.. A doctype? A modern browser? And finally, a URL so we can see. |
#5
| |||
| |||
|
|
so if I have a <td> that's, say, 400px wide, and I put a paragraph in it, and I want a padding ONLY ON THE RIGHT (so table cellpadding property is not good here) of, say, 20px, so there's 20px empty space between right edge of paragr and edge of <td>, how do you do that?????? thank you... |
#6
| |||
| |||
|
|
In article <fii1gd$rqk$1 (AT) aioe (DOT) org>, maya <maya778899 (AT) yahoo (DOT) com wrote: so if I have a <td> that's, say, 400px wide, and I put a paragraph in it, and I want a padding ONLY ON THE RIGHT (so table cellpadding property is not good here) of, say, 20px, so there's 20px empty space between right edge of paragr and edge of <td>, how do you do that?????? thank you... Perhaps something like http://netweaver.com.au/alt/maya.html I guess. |

#7
| |||
| |||
|
|
dorayme wrote: In article <fii1gd$rqk$1 (AT) aioe (DOT) org>, maya <maya778899 (AT) yahoo (DOT) com wrote: so if I have a <td> that's, say, 400px wide, and I put a paragraph in it, and I want a padding ONLY ON THE RIGHT (so table cellpadding property is not good here) of, say, 20px, so there's 20px empty space between right edge of paragr and edge of <td>, how do you do that?????? thank you... Perhaps something like http://netweaver.com.au/alt/maya.html I guess. yes, but did u measure that <td>?? I did a screenshot and measured in Photoshop, it's 420px wide.... ![]() |
#8
| |||
| |||
|
|
dorayme wrote: In article <fii1gd$rqk$1 (AT) aioe (DOT) org>, maya <maya778899 (AT) yahoo (DOT) com wrote: so if I have a <td> that's, say, 400px wide, and I put a paragraph in it, and I want a padding ONLY ON THE RIGHT (so table cellpadding property is not good here) of, say, 20px, so there's 20px empty space between right edge of paragr and edge of <td>, how do you do that?????? thank you... Perhaps something like http://netweaver.com.au/alt/maya.html I guess. yes, but did u measure that <td>?? I did a screenshot and measured in Photoshop, it's 420px wide.... ![]() thank you though, I appreciate your help.... |
#9
| |||
| |||
|
|
hi, I've been noticing lately that padding property is ADDING to dimensions of element, this is causing me lots of difficulties.. if for example I have this: div class="divMore" align="right"><a href="">Read More</a></div and in css: .divMore {background-image:url(images/bg_more.jpg); background-repeat:no-repeat; height:40px; padding-top:10px;} it ADDS 10px to HEIGHT of this element, making it not 40px high, but 50px high.. this is not how padding property is supposed to work.. my understanding is padding puts padding between edge of element and content of element, it's not supposed to ADD to DIMENSION of element.. this is causing me difficulties.. please, what am I missing... |
#10
| |||
| |||
|
|
Do you understand what I was saying about it being more than just according to standards but common sense that padding will increase height or width naturally and that height and width specifications cannot be thought to be max height and width. On this latter, here is another argument: suppose you tell an element which from its natural content would be say 200px tall, to be only 20px tall. What do you think should happen, what does happen? |
|
In other words, height instructions are not king. There are other things that go on to temper and add and probably subtract. |
![]() |
| Thread Tools | |
| Display Modes | |
| |