473,324 Members | 2,370 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Spacing

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
Jan 11 '08 #1
3 1911
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
Jan 11 '08 #2
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
Jan 11 '08 #3
On Jan 11, 2:28 am, "Jonathan N. Little" <lws4...@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
Jan 11 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Hal Vaughan | last post by:
I'm testing a GUI app on a couple Linux boxen and one Win2k box. I'm using Java 1.4.2 on each (or the closest on Win2k -- whatever version comes close). On one Linux box and the Win2k box the...
12
by: Rick DeBay | last post by:
I'm trying to create a layout table, where the spacing between rows varies. I've tried using setting margin-top and border-top for the rows I wan't spaced down from the one above, and I've also...
7
by: Danny | last post by:
I have a small <div> element which contains two text blocks - one within <h5> tags and the other within <p> tags. I don't want any extra line spacing between elements so use the display:inline...
5
by: Andrew Poulos | last post by:
If I have a text INPUT within a block of text how do I 'correct' for the line spacing. The line spacing above and below the INPUT is larger than the line spacing generally: <div...
4
by: fleemo17 | last post by:
Is there a way to tweak the spacing of lines of text (or leading) *specifically* in IE6? I've created a "Quick Search" box in my layout which renders pretty consistently in all the browsers I've...
12
by: Sebastien B. | last post by:
I'm wondering if it's at all possible to have spacing between a table's cells, and only between the cells, not between the outter cells and the table's border. See end of message for an example...
4
by: metoikos | last post by:
I've scoured the web (clumsily, I'm sure) for information on the difficulties I am having, checked my markup in validators, and had a friend with more CSS clue look over it, but I haven't had any...
3
by: DigMar | last post by:
Hello, Thi is a newbie question regarding the spacing of words in a header with links. I simply want to space the clickable words on my header bar more horizontally. Here is my code to make more...
10
by: phil-news-nospam | last post by:
I have a table with 3 columns in 1 row. I want to increase the spacing _between_ the columns (gutter) _without_ increasing the spacing between those columns and the table itself. Is there a way...
1
by: replyrpatil | last post by:
What I am trying to do: I need to print a compact access report (font 6 size) created using RTF2 program developed by Stephen Lebans to generate a TIF image of custom size (5.5 in x 2.0 in) ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.