Thread: Line over text
View Single Post
Old 06-10-2013, 09:16 AM   #16
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,852
Karma: 8821117
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by RbnJrg View Post
There is another method to achieve what you want that I think it could work in ADE too; if later I have a bit of free time, I will post it.
Here is the another method; this one works also in ADE and should be the definitive solution for your issue. In your css stylesheet, write:

Code:
h2 {
  margin: 0;
}

.line_aside {
  display: block;
  height: 2em;
  border-bottom: 3px solid black;
  margin: -0.5em 0 1em;
  background: white;
}

.text {
  float:left;
  font-weight: bold;
  padding: 0 16px 0 5px;
  margin: 1em 0 0 -0.2em;
  font-size: 1.2em;
  background: white !important;
}

p {
  font-size: 1em;
  margin: 0;
  text-align: justify;
  text-indent: 0;
}

p + p {
  text-indent: 1em;
}
And in your .html file write:

Code:
<h2 class="line_aside"><span class="text">BLA BLA BLA BLA</span></h2>

<p> ...something... </p>
Below I attach a screenshot of ADE and the respective epub.

Regards
Rubén
Attached Thumbnails
Click image for larger version

Name:	line-aside.jpg
Views:	183
Size:	59.4 KB
ID:	106853  
Attached Files
File Type: epub line-aside bis.epub (2.6 KB, 144 views)

Last edited by RbnJrg; 06-10-2013 at 09:24 AM.
RbnJrg is offline   Reply With Quote