Solved

line-height:15em      css

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article discusses four methods for overlaying images in a container on a web page
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…

747 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

14 Experts available now in Live!

Get 1:1 Help Now