Solved

line-height:15em      css

Posted on 2008-06-17
1
222 Views
Last Modified: 2008-06-18
@media print{
        #breaker1,#breaker2,#breaker3{display:block;}
        #breaker1{
                line-height:15em;
        }
        #breaker2{
                line-height:15em;
        }
        #breaker3{
                line-height:15em;
        }
}


if i want to start new page(like a page break In ms word)  brake1 brake2 break3
what shold i do
0
Comment
Question by:teera
1 Comment
 
LVL 82

Accepted Solution

by:
hielo earned 350 total points
ID: 21810294
Save the example below as test.html and see how the different values for line-height generate a bigger space between the paragraphs. NOTE: I added borders to the <div> elements so you can clearly see the effect of changing the line-height. For you purposes, you will NOT need the border.

>>What should I do?
Open YOUR html page, do a print-preview to see if Page 2 actually starts at page 2. IF not, incremente the line-height of #breaker1. Repeat this step until Page 2 actually starts at page 2 of your print preview. Once you have determined the value for #breaker 1, then contentrate on #breaker2. Basically, its the same series of steps as the previous one, except now you are trying to make sure Page 3 would actually print on the third page by modifying the line-height of #breaker2 until it is pushed down so that it would print on the third page.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
	<style type="text/css">
	div{border:1px solid black;}
	</style> 
</head>
<body>
<div style="">&#160;</div>
<p>A</p>
<div style="line-height:5em;">&#160;</div>
<p>B</p>
<div style="line-height:10em;">&#160;</div>
<p>C</p>
<div style="line-height:15em;">&#160;</div>
<p>D</p> 
</body>
</html>

Open in new window

0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question