Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 01-03-2011, 04:37 PM   #1
NASCARaddicted
Addict
NASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and grace
 
Posts: 340
Karma: 43106
Join Date: Apr 2009
Location: Germany
Device: BeBook One, Pocketbook Touch, Pocketbook Touch HD
need help on how to align a table to the right

Hello

I have a small table that I want to align to the right with CSS. I tried different things, and they look good in Firefox and in the ebook viewer of Calibre, but when I put the epub-file on my ebook-reader (Bebook with ADE), the table is not right aligned, it is aligned to the left.

Here is what I tried so far, after some Google search:

.tabrechts {border-style:hidden; border-collapse: collapse; margin-right: 0em; margin-left: auto;}

and I also tried

.tabfloat {border-style:hidden; border-collapse: collapse; width:auto; float:right;}

As I said, it looks good in Firefox and Calibre, but once it ends up on my ebook-reader, the table is on the left side.

Can anyone help me, please? Am I doing something wrong?
NASCARaddicted is offline   Reply With Quote
Old 01-04-2011, 04:25 AM   #2
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
ADE treats "auto" margins as "0", which is allowed in the ePUB spec. Try "margin-right: 0" instead, or wrap the table in a <div> with "text-align: right" (you may have to set the aligment inside the table again, or the cells will be right-aligned too).
Jellby is offline   Reply With Quote
Advert
Old 01-04-2011, 11:03 AM   #3
NASCARaddicted
Addict
NASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and grace
 
Posts: 340
Karma: 43106
Join Date: Apr 2009
Location: Germany
Device: BeBook One, Pocketbook Touch, Pocketbook Touch HD
Quote:
Originally Posted by Jellby View Post
ADE treats "auto" margins as "0", which is allowed in the ePUB spec. Try "margin-right: 0" instead, or wrap the table in a <div> with "text-align: right" (you may have to set the aligment inside the table again, or the cells will be right-aligned too).
I already tried margin-right:0, together with margin-left: auto. So do you mean I should remove the margin-left part?

Well, I will give both your ideas a try. Thanks in advance.
NASCARaddicted is offline   Reply With Quote
Old 01-04-2011, 01:34 PM   #4
NASCARaddicted
Addict
NASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and grace
 
Posts: 340
Karma: 43106
Join Date: Apr 2009
Location: Germany
Device: BeBook One, Pocketbook Touch, Pocketbook Touch HD
so, I just tried, but with no success.

At first I removed the margin-left: auto, I just left the margin-right at 0. Now, even in Firefox the table is left aligned - so that is the exact opposite of what I wanted.

Then I tried it with div text align right and a table with no margins at all, but it was the same: the whole table is on the left.

Am I doing something wrong, or am I just stupid? Or what else could be the problem?
NASCARaddicted is offline   Reply With Quote
Old 01-05-2011, 05:52 AM   #5
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
What's the width of the table? Can we see a sample?
Jellby is offline   Reply With Quote
Advert
Old 01-05-2011, 12:11 PM   #6
NASCARaddicted
Addict
NASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and grace
 
Posts: 340
Karma: 43106
Join Date: Apr 2009
Location: Germany
Device: BeBook One, Pocketbook Touch, Pocketbook Touch HD
Quote:
Originally Posted by Jellby View Post
What's the width of the table? Can we see a sample?
The table itself is not very width. It only has 1 column. Actually I only need it for text. Maybe there are other possible ways besides using a table ...

anyway, here is table (or the text of the table):

Karl Blomquist, Privatdetektiv
Adr.: Hauptstraße 14, Kleinköping.«

You see, this is the end of a letter. I want this text to be on the right side of the page, but I want it to be left-aligned. So I thouhgt I put this 2 lines in a table, use "align: left" on the table column and then right align the whole table.

But somehow I didn't manage to do it.

Maybe there are other ways to achieve what I want. I also thought about using blockquote, but this didn't work either.
NASCARaddicted is offline   Reply With Quote
Old 02-18-2011, 01:46 PM   #7
hard13
Enthusiast
hard13 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jan 2011
Location: Parisj Van Java
Device: none
have you tried table align?
hard13 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I can not align the text...help please! XD derfel_spain ePub 17 12-18-2010 09:45 AM
Anyone know how to convert a pdf table into a table in Word or HTML? BasilC Workshop 7 06-25-2010 01:02 AM
Sideway Table in ePub (Rotate table/text) Lapiz ePub 3 01-29-2010 01:11 PM
unwanted table-change (vertical align) by calibre NASCARaddicted Calibre 2 01-27-2010 03:35 AM
Forget coffee table books-- how about a kitchen table book? ardeegee Lounge 10 12-02-2009 12:00 PM


All times are GMT -4. The time now is 08:11 AM.


MobileRead.com is a privately owned, operated and funded community.