Click here to get back home

How to remove page break?

 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
How to remove page break? opt_inf_env 05-29-2005
Posted by opt_inf_env on May 29, 2005, 12:53 pm
Please log in for more thread options


Hello,

I have the following fragment in my html document:

<h2>Text 1</h2>
<small>Text 2</small>

If I see this fragment with browser I see empty line between text1 and
text2. Do you know how one can remove it?


Posted by Lars Eighner on May 29, 2005, 3:04 pm
Please log in for more thread options


In our last episode,
the lovely and talented opt_inf_env@yahoo.com
broadcast on comp.infosystems.www.authoring.html:

> Hello,

> I have the following fragment in my html document:

><h2>Text 1</h2>
><small>Text 2</small>

> If I see this fragment with browser I see empty line between text1 and
> text2. Do you know how one can remove it?

You don't have an html document. There is no element SMALL in
html.

You have a line break after Text 1 because H2 is a block
element. Browsers are supposed to ignore tags they do not
understand, so this would look like a block element followed by
raw text to most of them.

--
Lars Eighner eighner@io.com http://www.larseighner.com/
War on Terrorism: Bad News from the Sanity Front
"In this autumn of anger, even a liberal can find his thoughts turning to ...
torture." --Jonathan Alter,_Newsweek_

Posted by Leif K-Brooks on May 29, 2005, 8:33 pm
Please log in for more thread options


Lars Eighner wrote:
> There is no element SMALL in html.

http://www.w3.org/TR/html4/present/graphics.html#h-15.2.1

Posted by opt_inf_env on June 5, 2005, 6:33 am
Please log in for more thread options


Ok. It was my mistake. <small> is not an html tag. However it works,
i.e. if I put this tag into <h2></h2> tags (<h2> Text 1 <br> <small>
Text 2 </small></h2>) I get what I want. Text2 is smaller than Text1
and distance between lines is smaller than in example what I put above.
What I do not like in this solution is that I use the unknown tag (I
though that it have been defined in css but it is not the case). Do you
know how the same result can be reached with the usage of html tags?



Posted by Jim Jaworski on June 5, 2005, 3:36 pm
Please log in for more thread options


opt_inf_env@yahoo.com wrote:
> Ok. It was my mistake. <small> is not an html tag. However it works,
> i.e. if I put this tag into <h2></h2> tags (<h2> Text 1 <br> <small>
> Text 2 </small></h2>) I get what I want. Text2 is smaller than Text1
> and distance between lines is smaller than in example what I put above.
> What I do not like in this solution is that I use the unknown tag (I
> though that it have been defined in css but it is not the case). Do you
> know how the same result can be reached with the usage of html tags?

The best way is to use CSS's page break before pseudo element. For example:

h2.sect2 {
font-family: Arial,Palatino,sans-serif;
font-size: 1.2em;
text-align: center;
page-break-before: always;
}

Jim

Similar ThreadsPosted
page-break March 3, 2005, 1:33 am
Force Page-break when printing February 2, 2006, 11:44 am
How to remove automatic printing popup from saved web page? July 3, 2005, 10:52 am
shopping cart items page with several 'remove' buttons June 16, 2006, 12:13 pm
Splitting image at page break disappears when printing. September 30, 2004, 4:24 pm
without

break

November 7, 2004, 8:44 pm
no break hyphen June 6, 2006, 5:00 pm
style to remove all styles March 25, 2005, 5:09 am
How can I remove tags which have no attributes? May 28, 2005, 6:31 pm
How do I remove frames EASILY?? November 21, 2005, 2:03 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap