Tricky CSS box model problem

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
iand
Sr. Propeller Head
Posts: 131
Joined: Thu Dec 18, 2008 5:46 am
Location: London, England

Tricky CSS box model problem

Post by iand »

I am trying to use CSS to make a large circle for my bullet points to match output produced in Framemaker although it would work with any ascii symbol. I can't use an image for my list marker because images are too blocky or too big in PDF output as you can't set the resolution to use for PDF output for these images (this is a bit of a CSS limitation!). Anyway, I have tried the following CSS which partly works:

ul li:before
{
display: marker;
font: Arial;
font-size: 40pt;
content: "\2022 T";
}

This image was captured from Flare's print preview display:


The "bullet" is the correct size but unfortunately this makes the bounding box too big which messes up the vertical alignment. My cunning idea is to shrink the box. Anyone know how I can do that? I thought this would do the trick but it doesn't:

margin-top: -10pt;
margin-bottom: -10pt;

The green rectangle shows the current box. The red rectangle shows the box I would like.
largebullets.png
You do not have the required permissions to view the files attached to this post.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Tricky CSS box model problem

Post by LTinker68 »

I wonder if you'd have better luck if you used a paragraph tag with an auto-numbering format instead of using a standard HTML list.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Tricky CSS box model problem

Post by KevinDAmery »

I may be missing something, but wouldn't that red bounding box result in the text of different lines overlapping the capital letters?
Until next time....
Image
Kevin Amery
Certified MAD for Flare
GregStenhouse
Sr. Propeller Head
Posts: 330
Joined: Tue May 13, 2008 3:27 pm
Location: Christchurch, New Zealand

Re: Tricky CSS box model problem

Post by GregStenhouse »

Try negative padding, that has done the trick for me before. But as LTinker said, autonumbers are a good way to go for this kind of thing. Just copy the required bullet into the mc-auto-number-format class, and play around with the mc-auto-number-class if you want different color effects, sizes etc applied.
iand
Sr. Propeller Head
Posts: 131
Joined: Thu Dec 18, 2008 5:46 am
Location: London, England

Re: Tricky CSS box model problem

Post by iand »

Hi everyone,
Thanks for the suggestions. It seems that the display marker command prevents use of negative margins or negative padding, this seems to be a limitation in CSS, the same thing happens if I try this CSS in a web browser. I tried display block but that had it's own problems. I think I will have to use a paragraph tag with autonumbering as suggested. I prefer my lists to be tagged as lists, but it looks like I won't be able to manage that.

Thanks for your help

Ian
Post Reply