6 replies [Last post]
JimmyPez
JimmyPez's picture
Offline
Regular
NY
Last seen: 15 years 7 weeks ago
NY
Joined: 2007-03-15
Posts: 18
Points: 0

Okay here we go

In both IE and Firefox this works fine,

.intro_text{ width:600px; display:block; margin:30px auto; padding-top:20px; text-align:justify; }

text is centered (due to the width auto) - and it spans 600px across the screen buuuuut in safari, it is probably about 400px and left aligned -

the code itself is just a

BLAHBLAHBLAHBLAH

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 2 years 4 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

Justified text is

Justified text is problematic. There is no common treatment of a last line. Even the newspapers vary in their treatments, some stretching things out to fit end to end, others simply left aligning. The differences are well within the specs—that is, the specs don't say one way or another. Smile

W3.org wrote:
Note. The actual justification algorithm used depends on the user-agent and the language/script of the text.

Conforming user agents may interpret the value 'justify' as 'left' or 'right', depending on whether the element's default writing direction is left-to-right or right-to-left, respectively. See http://www.w3.org/TR/CSS21/text.html#propdef-text-align
cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

IChao
Offline
Enthusiast
Göttingen, Germany
Last seen: 14 years 3 weeks ago
Göttingen, Germany
Timezone: GMT+2
Joined: 2005-08-16
Posts: 148
Points: 0

The provided code does not

The provided code does not reproduce the reported problem.

JimmyPez
JimmyPez's picture
Offline
Regular
NY
Last seen: 15 years 7 weeks ago
NY
Joined: 2007-03-15
Posts: 18
Points: 0

you sure? safari 1.3.2

you sure?

safari 1.3.2 (v312.6)

ill try the justification

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 8 years 11 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Ah here is an area that MS

Ah here is an area that MS has, for once, done something GOOD! :?

text-justify:newspaper;

stumbled on it by accident once when having horrors trying to get columner text looking half decent, text-align:justify is next to useless, whereas text-justify:newspaper produced very pleasing results (sadly In IE only)

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

JimmyPez
JimmyPez's picture
Offline
Regular
NY
Last seen: 15 years 7 weeks ago
NY
Joined: 2007-03-15
Posts: 18
Points: 0

the problem is in safari -

the problem is in safari - it worked in firefox and ie...changing the justification worked - thanks

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 8 years 11 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

sorry that wasn't intended

Smile sorry that wasn't intended as a fix but an interesting aside as Gary's post was prety much the reason for the problem, but I hadn't seen the other posts slip in before me.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me