![]() |
#31 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,775
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Wrong
![]() If the tittle is short, then no scroll bar is showed, otherwise the bar is there. Watch the attached epub and try to increase the font-size to see what happens. Last edited by RbnJrg; 07-08-2025 at 04:57 PM. |
![]() |
![]() |
![]() |
#32 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 451
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
!
Learning something new every day. in your css, you have the left column at 45%, the right column at 50%, with a 10px right-margin for the left column. How'd you do the math for converting the left-over 5% into px? Also, it seems that this solution basically makes the nowrap kind of meaningless since the column widths are fixed, right? |
![]() |
![]() |
![]() |
#33 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,775
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
![]() Quote:
Code:
.col1 { display: inline-block; width: max-content; max-width: 45%; vertical-align: top; margin-right: 10px; white-space: nowrap; overflow: auto; text-overflow: clip; } |
||
![]() |
![]() |
![]() |
#34 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 451
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
I've always considered myself a jack of all trades, master of none. Nothing reinforces this more effectively than the sheer number of css styles and attributes I've never even heard of...
Can you pair the "max content" in the first column with "fit content" in the second? |
![]() |
![]() |
![]() |
#35 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,775
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
![]() 1. In your .css stylesheet: Code:
.container { display: flex; } .col1 { display: inline-block; width: max-content; max-width: 45%; margin-right: 10px; white-space: nowrap; overflow: auto; text-overflow: clip; flex-shrink: 0; } .col2 { flex-grow: 1; } Code:
<div class="container"> <p class="col1">This is a line</p> <p class="col2">This is the text asociated to the tittle on the left column.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ac tellus nunc. Phasellus imperdiet leo metus, et gravida lacus.</p> </div> <div class="container"> <p class="col1">This is a quite long line of text</p> <p class="col2">This is the text asociated to the tittle on the left column.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ac tellus nunc. Phasellus imperdiet leo metus, et gravida lacus.</p> </div> As you can see, in this approach, the scroll bar is positioned in the first column, flush with the end of the second column. If you'd prefer the bar to be positioned below the line in the first column, you should use the following code: 1. In your .css stylesheet: Code:
.container { display: flex; } .col1 { width: max-content; max-width: 45%; margin-right: 10px; flex-shrink: 0; } .scrollBox { white-space: nowrap; overflow: auto; text-overflow: clip; max-height: 2.4em; } .col2 { flex-grow: 1; } Code:
<div class="container"> <div class="col1"> <p class="scrollBox">This is a line</p> </div> <p class="col2">This is the text asociated to the tittle on the left column.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ac tellus nunc. Phasellus imperdiet leo metus, et gravida lacus.</p> </div> <div class="container"> <div class="col1"> <p class="scrollBox">This is a quite long line of text</p> </div> <p class="col2">This is the text asociated to the tittle on the left column.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ac tellus nunc. Phasellus imperdiet leo metus, et gravida lacus.</p> </div> Of course, all this only under epub3 (and also is a sample of the power of css3 and epub3; achieving this under epub2 is unthinkable). Below I attach the respective epub. Last edited by RbnJrg; 07-08-2025 at 09:12 PM. |
|
![]() |
![]() |
![]() |
#36 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 451
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
Sorry, which part doesn't work in epub2?
I copied your code into a blank epub2 and ran it through Sigil's ereader plugins without any apparent issue. Are the plugins reading the epub2 as if it were an epub3/in and epub3 environment? |
![]() |
![]() |
![]() |
#37 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,775
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Flex-boxes are no supported by epub2. Sigil's plugins render epubs2 as if they were epubs3. If you want to see how the code looks in an epub2 ereader, then open the ebook with ADE 2.x/3.x.
|
![]() |
![]() |
![]() |
#38 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 451
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
From what I've gleaned from these forums, ADE is very idiosyncratic in how it interacts with CSS, though, right?
Is there a list of what CSS ADE will screw up because it's ADE versus what CSS it will screw up because it's categorically unsupported by epub2? |
![]() |
![]() |
![]() |
#39 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,775
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Quote:
https://www.mobileread.com/forums/sh...ad.php?t=94733 |
||
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Formatting calibredb list? | loviedovie | Calibre | 5 | 10-18-2015 02:20 PM |
Help with proper dashed list formatting, desperate at this point | luczak | ePub | 4 | 07-06-2011 04:18 PM |
Content Master List of Books with Known Formatting Issues | whitearrow | Amazon Kindle | 52 | 04-25-2010 06:57 PM |
Great article on ebook formatting and web standards (A List Apart) | Prospect | News | 6 | 03-10-2010 01:14 AM |
line formatting formatting question | daesdaemar | Workshop | 9 | 02-06-2009 11:47 AM |