Hi there;
I’m importing an HTML document, that will ultimately be re-saved as rtf.
I have a series of sections (DIVs), each has a colored background (see html below for a simple sample).
On import, I want to keep the list items in the second div to be maintained in the same colored box as the remainder of the content in the div. In other words, I want to generate an rtf, that renders much like this html renders in a browser.
From looking at other support posts, I realize that the Aspose is trying to model how Word would render this html. What I’m looking for is any approach (code, css, or html changes), that would allow me to get the combined “text and list in one colored box” that this html produces in the browser.
There are actually two things I’d like to resove:
- The list items showing up in their own colored “box”, instead of the same box as the text above it.
- The missing orange border around the second box.
Attached are two images. One shows the output of the html in the browser - what I I’m trying to replicate in rtf. The second image shows the current rtf output. RtfOutput.png (6.7 KB)
BrowserOutputDesiredOutput.png (16.4 KB)
Any ideas? Thank you so much.
<style>
.CalloutBox {
background-color: #E6FAFF !important;
border: 10px solid #FFE38C !important;
}
</style>
<title>Exercise: Walking for Wellness</title>
<div class="CalloutBox">
<h3>Call out without a list in it. </h3>
<p>This is a basic callout box. What is going on here?</p>
</div>
<div class="CalloutBox">
<h3>Call out with a list in it. Should not muck up call out box</h3>
<p>This is a basic call out box. What is going on here?</p>
<ul>
<li>List item</li>
<li>List item</li>
<li>List item</li>
</ul>
</div>