Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

line-height:15em      css

Posted on 2008-06-17
1
Medium Priority
?
230 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 82

Accepted Solution

by:
hielo earned 1400 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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... …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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 tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
Suggested Courses

715 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