I'm thinking of creating some CSS styles for padding and margin that would work something like this...
If you want to add padding to all four sides...
<div class="Pad4">
If you want to add padding to the top and bottom...
<div class="PadV">
If you want to add padding to the left and right sides...
<div class="PadH">
Similar styles would designate padding for the top (PadT
), bottom (PadB
), left (PadL
) or right (PadR
) sides.
The second class of styles would designate the amount of padding or margin. For example, 10
= 10 pixels, 25
= 25 pixels.
You would then put it together, like this:
<div class="PadV 10 PadH 25">
This particular div would then have 10 pixels padding on the left and right sides and 25 pixels on the top and bottom.
Of course, this won't work exactly as I've described it because of a number of issues. For example, imagine these two div's...
<div id="Uno" class="PadV 10 PadH 25">
<div id="Dos" class="PadV 25 PadH 10">
If I then have the following style...
.PadV.10
how could I make sure it only gets applied only to div#Uno
, not to div#Dos
?
And perhaps an even more important question - does my scheme sound like a good idea, or is it too verbose, amateurish or whatever?