PDA

View Full Version : spacing a design


pompei
04-04-04, 05:37 PM
Does anyone know an elegant way to space out a layout by specifying a pixel amount without resorting to using <br> or image spacers. I know you can use css styles to add padding, but how could you say you wanted 11pixels vertical space, or 14pixels vertical space without having to create seperate css styles for each?

To provide a better context, I'm generating a list of items dynamically, and the spacing between each listing can vary...so all I want to be able to specify is the pixel gap between each seperate listing.

Thanks in advance for any help!

Revenant
04-06-04, 05:38 PM
Not sure what you're looking for, but I'm sure this should help some.

http://www.southerntwilight.com/tutorials/csscommands.html#text

Goodluck !

Rev

pompei
04-09-04, 12:45 PM
Thanks for the link Revenant,

There certainly is a way to hack around with CSS to get the proper spacing (e.g. set the font size to 1 pixel, and then the padding according to how many pixel spaces you want, and then apply that style around a &nbsp;).

I was just hoping there was a simple standard command like: addSpace($numpixels)

Too much to hope for in standard html/css I think!