Click to See Complete Forum and Search --> : Padding not working on all sides


mataichi
09-14-2007, 03:43 PM
I have been messing with this forever.
I have a class called LeftPad. Here is how it is declared...
.LeftPad { padding: 5px 10px 5px 35px; }

The only place I can tell it works is on the left side (35px). No other sides are working. I can change any of the other sides to 100px and there is no change on the screen.

Anybody know why??

Here is my use of the class....
<span class="LeftPad"><img src="images/bullet1.gif">&nbsp;</span><br>

I also try to do the same thing in other classes with the same result, only the left side gets padded.

This is driving me crazy! Thnx.

dtm32236
09-14-2007, 03:47 PM
if that's the only instance of it, do:

<img src="images/bullet1.gif" style="margin: 5px 10px 5px 35px">

and why the nbsp if you're having padding anyway?

ray326
09-14-2007, 11:19 PM
Inline elements don't have height, just left and right, which are working.

stymie
09-15-2007, 04:47 AM
.LeftPad { display: block; padding: 5px 10px 5px 35px; }
You may have to then set the height and width of the span to suit your needs.