• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 472
  • Last Modified:

Extra vertical space and </p> tags

Hi,
I have the page with the following HTML:
<table width="100%" border=0><tr><td valign=top><table width=31 border=0 align=left cellspacing=10><tr><td>    
<p>
<img  src="/someimage.gif">
</p>
</td></tr></table>

<p>
some text  
</p>

<br clear=all>
</td></tr></table>

...some links

Page itself is at http://www.windows.ucar.edu/tour/link=/earth/Atmosphere/overview.html

Netscape and Firefox add quite a bit of vertical space before links that come after tables. By trial and error I've found out that removing the last </p> tag solves the problem. But my boss wants valid HTML and is reluctant to remove closing </p> tags. Is it a known problem, and is there any other way to solve it? Thanks.
0
jgenyuk
Asked:
jgenyuk
2 Solutions
 
seanpowellCommented:
I'm afraid there's a lot there that isn't valid - starting with an incorrect doctype for the page.
I would prefer to fix all the other problems first before worrying about how different browsers treat pixels.

Are you up to the task?

Sean
0
 
DreamMasterCommented:
Why on earth would you want to use the <p> tag for that anyway? There's better ways to format text into paragraphs.

What you are experiencing is the problem that both <form> tags and <p> tags have. They generate extra line breaks.

If you don't need them, why use 'em? ;)

Regards,
Max.
0
 
jgenyukAuthor Commented:
The thing is, it's an old page, created well before my time, and there are quite a few of similar ones, so I'd prefer to change as little as possible for now, just making sure it looks reasonable.

Also the bulk of these pages is written by writers, not programmers, and I'm reluctant to make them use stylesheets and other stuff beyond simple HTML tags. There is one common simple stylesheet that is used for all pages, will it help if I define a style for <p>? Or is there any other easy way to outsmart it?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
kiddangerCommented:
Your best bet is to set up the pages as templates and have the writers just submit the text into forms that save the information either in an XML file or database and let the page render dynamically.  Then you have complete control over the input without requiring your writers to educate themselves in page layout.
0
 
arantiusCommented:
> Why on earth would you want to use the <p> tag for that anyway?
> There's better ways to format text into paragraphs.

Um, the p in <p> stands for paragraph.  That's what the tag is for.  What's wrong with using the tag as it's designed to be used?
0
 
DreamMasterCommented:
Well...there's not much wrong with it, but everybody knows it generates extra space..
0
 
kiddangerCommented:
arantius...

And form is for a form, which should not have any additional line breaks, nor should paragraphs.  I believe that's the point DreamMaster is trying to make.  They're block elements, not block elements with an additional line feed, or they shouldn't be.
0
 
DreamMasterCommented:
Thanks arantius...trying to explain that at 7 am is not advisable.. :P

Regards,
Max.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now