Solved

line-height:15em      css

Posted on 2008-06-17
1
221 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Unordered lists (HTML ul tags) are very handy to create menus of all types, shapes and sizes.  All it takes is a little knowledge of CSS and the possibilities are endless. First off, you should know the general format for menus created using the …
When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

867 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now