Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Axel Siebenwirth
August 23, 2007, 9:15 am
rate this thread
I've just got a small question considering the margin above a <p> element.
With IE there's about no space between the grey box and the word
With Firefox there's just the right spacing inbetween these two.
What's causing thing and how can I workaround this in IE?
Re: margin above of
Scripsit Axel Siebenwirth:
I have many big questions concerning the markup. It's a complicated mess of
table layout with embedded CSS.
What in your code makes you think there should be? And spacing is generally
a matter of styling (CSS), not HTML.
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
<form action="..." method="post">
<input id="id" name="user_id" type="text" size="15" maxlength="30"></div>
<input id="pwd" name="password" type="password" size="15"
<div><input type="submit" value="Anmelden"></div>
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
Jukka K. Korpela ("Yucca")