![]() |
#1 |
Hmm.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 124
Karma: 2016606
Join Date: Oct 2015
Device: Android 4.2 Google Play Reader
|
Having trouble getting my H1 tags to center
Sigil 0.8.7 on Windows 8
I've hand written plenty of HTML but the browsers were not strict at all about it. XHTML seems more strict so I must be missing some detail here. I'm trying to change the CSS for all H1 tags so they are always centered but the Sigil preview does not show them centered when I use a plain H1 tag. But when I use Code:
<h1 style="text-align:center">blah</h1> Thank you. |
![]() |
![]() |
![]() |
#2 |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,944
Karma: 315160596
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
You'll need to post your CSS.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,054
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Is your CSS properly linked?
Is there another h1 entry in the CSS? Last one prevails. |
![]() |
![]() |
![]() |
#4 |
Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
And there's a caveat. Some readers override the stylesheet in ways that make that particular style problematic. I can't remember exactly which ones (ADE? Kindle?), but I remember commenting on it in the giant list of EPUB and/or KF8 quirks over on the wiki site.
|
![]() |
![]() |
![]() |
#5 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,752
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
It is not ADE/RMDSk and it is not KF8. Both work as they should.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Obsessively Dedicated...
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,221
Karma: 35037583
Join Date: May 2011
Location: PA {back in the usa!}
Device: Sony PRS-T2, ADE on PC
|
@crankypants, I have seen this also, it seems that the DEFAULT for H1, h2, etc is LEFT-aligned.
I do the css like so: h1 {text-indent: 0em; text-align: center; } and then also include all the additional margin, padding, bold settings, etc. I always include text-indent: 0em to prevent a slightly mis-aligned heading. (just in case) Then you don't have to add that "style" tag to every header. |
![]() |
![]() |
![]() |
#7 |
mostly an observer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,519
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
For reasons now obscure, I use H2 for chapter headings. Here's the CSS, which I've never seen to fail:
h2 { margin-top:1em; font-size: 150%; text-indent: 0em; font-style: italic; text-align:center; } As others have said, that obviates the need for any styling in the <h2> tag itself. |
![]() |
![]() |
![]() |
#8 |
Hmm.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 124
Karma: 2016606
Join Date: Oct 2015
Device: Android 4.2 Google Play Reader
|
Thanks all, but I just forgot to link the stylesheet to this xhtml file. Thanks for the tips though.
|
![]() |
![]() |
![]() |
#9 |
Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
|
![]() |
![]() |
![]() |
Tags |
center, h1 tag, text-align |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Searching tags to show tags I want even when it has a tag I do not | Jade Aislin | Library Management | 2 | 04-25-2012 01:01 PM |
Calibre Tags & Aldiko Tags Not the Same | Themus | Calibre | 3 | 03-21-2012 08:23 PM |
deleting tags from available tags list | BeccaPrice | Calibre | 8 | 10-15-2011 11:39 AM |
Amazon Tags - Popular tags vs Unique tags. | chrisanthropic | Writers' Corner | 6 | 09-19-2011 11:18 PM |
PRS-500 Tags for Bold, Italic, Center, Etc. in LRF? | EatingPie | Sony Reader Dev Corner | 9 | 04-07-2007 01:06 AM |