HighDots Forums  

Re: "Justify"-like effect within text

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


Discuss Re: "Justify"-like effect within text in the Cascading Style Sheets forum.



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

Default Re: "Justify"-like effect within text - 09-02-2003 , 03:39 AM






Owen Jacobson wrote on 02 sep 2003 in
comp.infosystems.www.authoring.stylesheets:

Quote:
We all know that text-align: justify; is supposed to justify the
block's text across the box. I have a friend, however, who wants to
take that further. A visual example, because it's 2:30 AM and I don't
want to try to describe it:

MARGIN| S O M E T E X T |MARGIN

Where "SOME TEXT" is a heading, presumably, and the spacing between
letters works out such that the contents space to fit the whole box,
which stretches and shrinks with the browser or page.

Ideally we'd like to avoid putting each letter in a div, but if that's
the only way...

<style>
span{width:400px;border:green solid 1px;
letter-spacing:33px;text-align:center;}
</style>

This is
<span>SOME TEXT</span>
justified in IE6

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)


Reply With Quote
  #2  
Old   
Evertjan.
 
Posts: n/a

Default Re: "Justify"-like effect within text - 09-02-2003 , 04:05 PM






Owen Jacobson wrote on 02 sep 2003 in
comp.infosystems.www.authoring.stylesheets:

Quote:
Evertjan. wrote:

style
span{width:400px;border:green solid 1px;
^^^^^^^^^^^^

No good. The box in question has to change size with the page.
Letter-spacing seems to behave a little weirdly with percentage lengths
in that each letter is frequently (non-monospaced) font not the same
width on its own.
I think it is very good, not perfect, but without scripting, css will not
help you to all your specs.

Perhaps change the specs ?


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)


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.