473,230 Members | 1,968 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,230 software developers and data experts.

margin above of <p>

Hi,

I've just got a small question considering the margin above a <pelement.

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
Aug 23 '07 #1
1 1946
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/

Aug 23 '07 #2

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

Similar topics

11
by: Dan | last post by:
Workshop {Flash <-> PHP <-> MYSQL} 1-4 December 2003 in Milan (Italy) 4 full immersion days in a Flash/php/MySQL project start-up. The workshop is a unique opportunity for partecipants to...
2
by: Nachi | last post by:
Hi, Urgent Help appreciated.... I am getting resultset with first condition and when try to get the resutlset from second condition i am getting the above error in SQL200. I know that i am...
2
by: Eshrath | last post by:
Hi, What I am trying to do: ======================= I need to form a table in html using the xsl but the table that is formed is quite long and cannot be viewed in our application. So we are...
2
by: Donald Firesmith | last post by:
I am having trouble having Google Adsense code stored in XSL converted properly into HTML. The <> unfortunately become &lt; and &gt; and then no longer work. XSL code is: <script...
1
by: RJN | last post by:
Hi I'm using XMLTextReader to parse the contents of XML. I have issues when the xml content itself has some special characters like & ,> etc. <CompanyName>Johnson & Jhonson</CompanyName>...
1
by: JezB | last post by:
I'm binding a DataGrid web-control to data fetched from a database. However some of my data fields contain text that is within <...> characters - I notice that everything between the <> is...
3
by: | last post by:
I have been researching articles on google on how to create a simple RSS feed that sucks <title><blurb><link><date> out of a sql server 2000 database via an aspx page. I know it has to be pushed...
14
by: Michael | last post by:
Since the include function is called from within a PHP script, why does the included file have to identify itself as a PHP again by enclosing its code in <?php... <?> One would assume that the...
2
by: -Karl | last post by:
Couls someone please advise me on this error. What I am trying to do is be able to convert an XML document into arrays. I read that the subs & functions have to be in <scripttags. Thanks! ...
3
by: Josh Valino | last post by:
Hi, I have a client that has our product and in one of the aspx files, there is code like this: <%= SomePublicProperty %> where the public property returns a string. In the test...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
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: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.