HighDots Forums  

Aligning line spacing following different font sizes on the same line

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Aligning line spacing following different font sizes on the same line in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Aligning line spacing following different font sizes on the same line - 06-30-2004 , 08:08 AM






Now and again I like to start a sentence with a large capital, maybe
in a different font. This upsets the line spacing and I've failed to
find any css that will effectively crop the capital letter from the
bottom, to allow the line spacing of the following smaller font text
to remain unaffected. I've always had to resort to a graphic for the
leading capital - is there a way I can do this with css?

Thanks

John

Reply With Quote
  #2  
Old   
Paul
 
Posts: n/a

Default Re: Aligning line spacing following different font sizes on the sameline - 06-30-2004 , 09:22 AM






John wrote:
Quote:
Now and again I like to start a sentence with a large capital, maybe
in a different font. This upsets the line spacing and I've failed to
find any css that will effectively crop the capital letter from the
bottom, to allow the line spacing of the following smaller font text
to remain unaffected. I've always had to resort to a graphic for the
leading capital - is there a way I can do this with css?

I think you might want the first-letter pseudo-element:

http://www.w3.org/TR/CSS21/selector.html#first-letter

I'm not sure how well supported it is in browsers. You don't really want
to crop the letter (which to me means cut off part of it), do you?


Reply With Quote
  #3  
Old   
John
 
Posts: n/a

Default Re: Aligning line spacing following different font sizes on the same line - 07-02-2004 , 12:01 PM



Hey Paul - thanks - I think this is exactly what I want. The only
reason I mentioned cropping is that the leading capital when
highlighted showed white space below which I attributed to the font
itself, rather than its line spacing, so was seeking some way of
trimming it off. But the Pseudo thing does away with all that malarky
and seems just what I need - thanks again.

John


Paul <paultwoonesix (AT) blueyonder (DOT) couk> wrote

Quote:
John wrote:
Now and again I like to start a sentence with a large capital, maybe
in a different font. This upsets the line spacing and I've failed to
find any css that will effectively crop the capital letter from the
bottom, to allow the line spacing of the following smaller font text
to remain unaffected. I've always had to resort to a graphic for the
leading capital - is there a way I can do this with css?


I think you might want the first-letter pseudo-element:

http://www.w3.org/TR/CSS21/selector.html#first-letter

I'm not sure how well supported it is in browsers. You don't really want
to crop the letter (which to me means cut off part of it), do you?

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.