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

How to remove page break?

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?

Jul 24 '05 #1
9 11950
In our last episode,
<11*********************@g49g2000cwa.googlegroups. com>,
the lovely and talented op*********@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 ei*****@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_
Jul 24 '05 #2
Lars Eighner wrote:
There is no element SMALL in html.


http://www.w3.org/TR/html4/present/g....html#h-15.2.1
Jul 24 '05 #3
op*********@yahoo.com wrote:
I have the following fragment in my html document: <h2>Text 1</h2>
<small>Text 2</small>
Its generally a poor idea to have inline elements outside a suitable block.
Perhaps the second line should be marked up as a paragraph? Or maybe a
generic block (div)?
If I see this fragment with browser I see empty line between text1 and
text2. Do you know how one can remove it?


That isn't a page break (as your subject suggests). A page break is a point
where when displayed on paged media (such as a hardcopy print out to sheets
of A4) one page ends and the next begins.

This would appear to be the default margin that comes after headings. You
can alter that with the CSS margin-bottom property.

http://css.nu/pointers/index.html#Tutorials might be of help if that means
little to you.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 24 '05 #4
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?

Jul 24 '05 #5
Els
op*********@yahoo.com wrote:
Ok. It was my mistake. <small> is not an html tag. However it works,


http://www.w3.org/TR/html401/present...tml#edef-SMALL

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Don McLean - Vincent
Jul 24 '05 #6
op*********@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
Jul 24 '05 #7
Jim Jaworski wrote:
The best way is to use CSS's page break before pseudo element.


page-break-before is a property, not a pseudo element.

Pseudo-elements in CSS 2.1 are :first-line, :first-letter, :before
and :after

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 24 '05 #8
Thank you,

It works. It also works with forms:
form {
margin-bottom:0mm;
}

However, it does not work with textarea:
textarea {
margin-bottom:0mm;
}

Anybody know why?

Jul 24 '05 #9
op*********@yahoo.com wrote:

It works.
form {
margin-bottom:0mm;
}

However, it does not work with textarea:
textarea {
margin-bottom:0mm;
}


textarea is an inline element, so margins don't apply.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jul 24 '05 #10

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

Similar topics

1
by: Roland Dalmulder | last post by:
Hello all, In my PHP script I put a text file into a string. Part of that string is read, changed and removed. The while loop continuest to extract the next part of the string. This goes all...
3
by: Vivek Mehta | last post by:
I want to receive XML stream generated at another URL however when I try to load the XML it errors out with one error or the other. I beleive this XML comes back with HTTP header which actually...
1
by: Scanner2001 | last post by:
I am trying to insert a printer page break inside of a form. I do not seem to be able to do this. My form contains 3 asp panels. Each of the panels have dynamically built content, and they are...
3
by: opt_inf_env | last post by:
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...
1
by: Kat | last post by:
This is a new one on me...a user wants to select a report then see a checkbox list of the "groups" to be included in the report. He wants to turn on/off whether or not to insert a page break...
7
by: Kieran Simkin | last post by:
Hi all, I'm having some trouble with a linked list function and was wondering if anyone could shed any light on it. Basically I have a singly-linked list which stores pid numbers of a process's...
3
by: Barbara Alderton | last post by:
I recently wrote an ASP.NET app that used user controls. I produced a printer-friendly output form. One requirement was a pagebreak between one part of the form and another. I had no problem...
0
by: deepak | last post by:
i have set multiple selection property in bith listboxes(html control) to true. i have taken 2 buttons(html control) say Button1,Button2.now i want to add mutiple selected items to another listbox...
7
by: =?Utf-8?B?aXdlYg==?= | last post by:
Can we set page breaks in ASP Pages dynamically based on the data being populated? Akshay.
11
by: Richard Maher | last post by:
Hi, I have read many of the copius entries on the subject of IE performance (or the lack thereof) when populating Select Lists. I don't mind the insert performance so much, (I get 100x120byte...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.