I'm having trouble with a test of formatting using float:outside for adjacent divs where the content overlaps in the margin.
The sample html:
The CSS: outside.css
Attached is the PDF showing the overlapping margin notes which come from DIV's with class="margin"
Any suggestions for keeping the content from overlapping without separating the DIVs by some of the body text?
Thanks,
Michael
The sample html:
<!DOCTYPE HTML>
<html xmlns:xs="http://www.w3.org/2001/XMLSchema">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="outside.css" media="print">
<title>Test Book</title>
<meta name="author" content="Michael">
<meta name="subject" content="Book">
</head>
<body>
<div class="mainContent">
<article id="kychr-sb-2-066-1">
<h3 class="article">Test Article Title</h3>
<div class="pageNo">[page 001] 1</div>
<div class="margin">Test margin note number one.</div>
<div class="margin">This is a second test margin note</div>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas commodo nunc et dui varius, mollis imperdiet felis rutrum. Integer sapien orci, ullamcorper a blandit et, rhoncus in massa. Nullam velit mi, porttitor at gravida quis, scelerisque id enim. In volutpat elementum massa quis dapibus. Morbi pellentesque ligula aliquam porta facilisis. Sed nec venenatis orci. Vestibulum convallis egestas porttitor. In hac habitasse platea dictumst. Quisque lacinia luctus felis id porttitor.
</p>
<div class="left-sig-div">
<div class="cc">Name One }</div>
<div class="cc">Name Two } cc</div>
</div>
<div class="right-sig-div">
<div class="surveyor">Name Three</div>
</div>
<div class="clear"></div>
</article>
</div>
</body>
</html>
The CSS: outside.css
@page {
size: 6in 9in;
margin-top: 0.75in;
margin-bottom: 0.75in;
}
@page mainContent:left {
@top-left { content: counter(page) }
@top-right {content: string(book-title) }
margin-left: 3cm;
margin-right: 4cm;
}
@page mainContent:right {
@top-right { content: counter(page) }
@top-left {content: string(header) }
margin-left: 4cm;
margin-right: 3cm;
}
div.margin {
float: outside;
clear: outside;
width: 6em;
margin-outside: -7em;
page-break-inside: avoid;
font-size: .8em;
line-height: 1em;
}
@page :first {
margin-top: 8cm;
@top-left { content: normal }
@top-right {content: normal }
}
@page mainContent:right:first {
margin-top: 5cm;
}
html {margin: 0;
}
body {
margin: 0;
padding: 0;
font-size: 10pt;
line-height: 12pt;
}
h3.article {
font-size: 10pt;
line-height: 12pt;
font-variant: small-caps;
margin-top: 12pt;
margin-bottom: 0pt;
display: block;
clear: both;
}
h3 + .pageNo {
clear: both;
margin-top: 0pt;
margin-bottom: 0pt;
page-break-after: avoid;
}
article p {
clear: both;
line-height: 12pt;
margin-top: 0em;
margin-bottom: 0em;
}
.mainContent {
page: mainContent;
counter-reset: page 1;
}
.center {
text-align: center;
}
.right {
text-align: right;
}
.left {
text-align: left;
}
.nowrap {
white-space: nowrap;
}
.indent-no {
padding: 0;
}
.right-sig-div {
float: right;
clear: right;
margin-top: 0;
margin-bottom: 0;
font-size: 1em;
}
.left-sig-div {
float: left;
clear: left;
margin-top: 0;
margin-bottom: 0;
font-size: 1em;
}
Attached is the PDF showing the overlapping margin notes which come from DIV's with class="margin"
Any suggestions for keeping the content from overlapping without separating the DIVs by some of the body text?
Thanks,
Michael