01-18-2022, 03:30 PM | #1 |
Enthusiast
Posts: 45
Karma: 10
Join Date: Sep 2011
Location: Barrhead, Scotland
Device: Kindle Paperwhite (2)
|
A CSS question
I will apologise, in advance, if this post should be under another category.
I'm using Sigil (latest version) to edit a project that's a scan of an old title, to just make it look a bit smarter (mainly alignment issues). Some of the Chapters have a main title, but then sections broken down with Roman Numerals as dividers. At present they look too close to the preceding, and following, text. In the CSS stylesheet, I see this for the appropriate lines:- display: block; font-weight: bold; text-align: center; text-indent: 0; margin: 1em 0 1em My question is, why does the margin only have 3 entries? (Shouldn't there be 4, for Top, Bottom, Left and Right?) If not, which entry refers to which position? Thanks |
01-18-2022, 03:55 PM | #2 |
Well trained by Cats
Posts: 30,455
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
It can have 1, 2 3 or all 4
1 is all the same 2 is top/bot, Left/right 3 (I can never remember ) 4 is as you said |
Advert | |
|
01-18-2022, 03:58 PM | #3 |
Zealot
Posts: 111
Karma: 196896
Join Date: Oct 2021
Location: Germany
Device: Tolino Vision 5, Tolino Tab 8"
|
As with many CSS properties, you can use margin with one, two, three or four parameters.
One param = all four sides. Two params = vertical | horizontal Three params: top | horizontal | bottom Four params: top | right | bottom | left See https://developer.mozilla.org/en-US/docs/Web/CSS/margin. EDIT: Darn, @theducks was faster! P.S.: Don’t expect every reader to honor margins on every block element. Some are notorious in ignoring whatever you give them, mostly on horizontal margins. Last edited by Moonbase59; 01-18-2022 at 04:02 PM. |
01-18-2022, 04:29 PM | #4 |
Running with scissors
Posts: 1,557
Karma: 14325282
Join Date: Nov 2019
Device: none
|
|
01-18-2022, 09:36 PM | #5 |
Enthusiast
Posts: 45
Karma: 10
Join Date: Sep 2011
Location: Barrhead, Scotland
Device: Kindle Paperwhite (2)
|
Thanks for those comprehensive replies.
Topic can now be closed. |
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CSS Question | phossler | Editor | 52 | 11-13-2020 04:23 PM |
css question | ralphiedee | Sigil | 74 | 12-23-2012 07:29 AM |
CSS Question | jackibar | Sigil | 24 | 03-01-2012 10:12 AM |
CSS question | crutledge | Workshop | 17 | 12-17-2011 08:52 AM |
CSS Question | AppleTard | Calibre | 1 | 06-12-2011 01:07 AM |