Click here to get back home

margin above of

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
margin above of

Axel Siebenwirth 08-23-2007
`--> Re: margin above of

Jukka K. Korpel...08-23-2007
Posted by Axel Siebenwirth on August 23, 2007, 5:15 am
Please log in for more thread options


Hi,

I've just got a small question considering the margin above a <p> element.

http://www.mooselook.de/myweb/p.html

With IE there's about no space between the grey box and the word
"Benutzername".
With Firefox there's just the right spacing inbetween these two.

What's causing thing and how can I workaround this in IE?

Thanks,
Axel

Posted by Jukka K. Korpela on August 23, 2007, 5:45 am
Please log in for more thread options


Scripsit Axel Siebenwirth:

> I've just got a small question considering the margin above a <p>
> element.
> http://www.mooselook.de/myweb/p.html

I have many big questions concerning the markup. It's a complicated mess of
table layout with embedded CSS.

> With IE there's about no space between the grey box and the word
> "Benutzername".

What in your code makes you think there should be? And spacing is generally
a matter of styling (CSS), not HTML.

> With Firefox there's just the right spacing inbetween these two.

Consider that as a coincidence: the browser behaves as if it read your mind.

Technically, it might have something to do with default margins for p
elements when they appear inside a td element, or something like that. But
the page contains no _paragraph_, so why are you using p markup?

Adequate markup for the content would consist of something like the
following:

<form action="..." method="post">
<h2>Anmelden</h2>
<div><label for="id">Benutzername:</label>
<input id="id" name="user_id" type="text" size="15" maxlength="30"></div>
<div><label for="pwd">Passwort:</label>
<input id="pwd" name="password" type="password" size="15"
maxlength="40"></div>
<div><input type="submit" value="Anmelden"></div>
</form>

It might be argued that a table, with labels in one column and corresponding
input fields in another, would be better markup for some purposes.

Anyway, the _rest_ is a matter of styling, not CSS. And the simple, logical
markup is a much better starting point for styling than a confusing layout
table.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/


Similar ThreadsPosted
What good is margin-bottom in IE? November 3, 2004, 1:28 pm
Help with Firefox margin issue August 30, 2005, 5:26 pm
Netscape margin attributes June 2, 2006, 2:47 pm
strange behavior with IE and margin... June 12, 2006, 2:03 am
after setting 's margin to 0 it is still non zero! (IE only) January 18, 2007, 12:54 pm
margin under floated divs February 14, 2008, 1:06 pm
IE6 -> searching for padding or margin, i don't find it September 29, 2004, 6:40 pm
create margin notes on webpages March 6, 2006, 9:03 pm
Default top and bottom margin disappear in IE7: why November 9, 2007, 11:44 pm
Div left margin getting double size on IE6. Why? May 12, 2008, 1:10 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap