|
From: shapper on 10 Jan 2008 21:09 Hello, I have a form with various labels, inputs and spans for comments. Each element is in a different line. I want to create some spacing between each element. For example, if I have: Name: [Name Input] Profession: [Profession Input] Profession Comment (Span) So I want to create a 2px spacing between each line. Should I use margin or padding? I know both work but what is the best solution? And are there other alternatives? Thanks, Miguel
From: Jonathan N. Little on 10 Jan 2008 21:28 shapper wrote: > Hello, > > I have a form with various labels, inputs and spans for comments. > Each element is in a different line. > > I want to create some spacing between each element. For example, if I > have: > > Name: > [Name Input] > Profession: > [Profession Input] > Profession Comment (Span) > > So I want to create a 2px spacing between each line. > > Should I use margin or padding? I know both work but what is the best > solution? > And are there other alternatives? http://www.w3.org/TR/CSS21/box.html#box-dimensions -- Take care, Jonathan ------------------- LITTLE WORKS STUDIO http://www.LittleWorksStudio.com
From: Beauregard T. Shagnasty on 10 Jan 2008 22:08 shapper wrote: > So I want to create a 2px spacing between each line. 2px? That is very tiny. Perhaps even much tinier on your monitor .. or on my monitor .. and will look almost "shoved against" what is above and below. Without even seeing your page, I'd suggest the bare minimum of 1em. input { margin: 1em; } -- -bts -Friends don't let friends drive Vista
From: shapper on 11 Jan 2008 12:42 On Jan 11, 2:28 am, "Jonathan N. Little" <lws4...(a)centralva.net> wrote: > shapper wrote: > > Hello, > > > I have a form with various labels, inputs and spans for comments. > > Each element is in a different line. > > > I want to create some spacing between each element. For example, if I > > have: > > > Name: > > [Name Input] > > Profession: > > [Profession Input] > > Profession Comment (Span) > > > So I want to create a 2px spacing between each line. > > > Should I use margin or padding? I know both work but what is the best > > solution? > > And are there other alternatives? > > http://www.w3.org/TR/CSS21/box.html#box-dimensions > > -- > Take care, > > Jonathan > ------------------- > LITTLE WORKS STUDIOhttp://www.LittleWorksStudio.com Hi, Thanks for the link. I know the box model. But if I can do it in both ways should i use margin or padding? I suppose, since it is the spacing between 2 elements that I should use margin. Thanks, Miguel
|
Pages: 1 Prev: Removing Unnecessary Styles Next: 1 fixed column, 1 fluid. Possible? |