HighDots Forums  

Line spacing not working

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss Line spacing not working in the HTML forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Ben C
 
Posts: n/a

Default Re: Line spacing not working - 10-29-2009 , 04:19 AM






On 2009-10-29, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote:
[...]
Quote:
Line height *is* a bit tricky and it is best not to use it (except at
the body level - sans units - to slightly increase it for the reasons JK
gives) unless you understand a few basics about it in a bigger context
than: "putting *this* line-height *here* makes the distance between this
and that text on *my* browser seem about right...".

The reason it is OK to keep out of what can be a hornet's nest is that
*perfectly serviceable* line heights are naturally used by the browser.
These days, browsers use a hidden but very detailed default stylesheet
(like yours in the head of your doc, but much more comprehensive). These
stylesheets are the product of a lot of intelligence and it is only safe
to change the defaults if you are confident you can do better.
Line-height doesn't usually even appear in the default stylesheet. The
initial value (which is "normal") is fairly normal, and good enough for
most normal purposes.

Reply With Quote
  #12  
Old   
David Stone
 
Posts: n/a

Default Re: Line spacing not working - 10-29-2009 , 08:56 AM






In article <hcb6t6$ig0$1 (AT) news (DOT) eternal-september.org>,
"Jonathan N. Little" <lws4art (AT) centralva (DOT) net> wrote:

Quote:
Adrienne Boswell wrote:

A few things:
1. dorayme <snip
2. This <snip
2. Usenet <snip

3? ;-)
Yep. Three is the number of things thou shalt list.

....

Five is right out!

Reply With Quote
  #13  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: Line spacing not working - 10-29-2009 , 02:23 PM



David Stone wrote:

Quote:
A few things:
1. dorayme <snip
2. This <snip
2. Usenet <snip

3? ;-)

Yep. Three is the number of things thou shalt list.
No, the morale is that we should use HTML on Usenet, since in HTML you can
use <ol> and let programs do the numbering. But, alas, Usenet is not safe
for HTML, and it will probably never be (it will die before that).

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Reply With Quote
  #14  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: Line spacing not working - 10-29-2009 , 02:34 PM



Ben C wrote:

Quote:
Line-height doesn't usually even appear in the default stylesheet. The
initial value (which is "normal") is fairly normal, and good enough
for most normal purposes.
No, the value normal tends to be too small for the commonly used fonts and
line lengths.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Reply With Quote
  #15  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: Line spacing not working - 10-29-2009 , 05:00 PM



David Stone wrote:

Quote:
[Whoosh!]
Gesundheit!

Quote:
I guess "Monty Python and the Holy Grail" was not terribly popular
in Finland?
Your lack of sense of humour, for anything outside your sphere of assumed
humour, and lack of on-topic contributions has been notified.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Reply With Quote
  #16  
Old   
dorayme
 
Posts: n/a

Default Re: Line spacing not working - 10-29-2009 , 05:19 PM



In article <gflGm.33557$La7.15403 (AT) uutiset (DOT) elisa.fi>,
"Jukka K. Korpela" <jkorpela (AT) cs (DOT) tut.fi> wrote:

Quote:
Ben C wrote:

Line-height doesn't usually even appear in the default stylesheet. The
initial value (which is "normal") is fairly normal, and good enough
for most normal purposes.

No, the value normal tends to be too small for the commonly used fonts and
line lengths.
Well, yes and no. It is good enough for most common purposes. Or how
about a compromise? The initial value of most browsers is *serviceable*!

To see how the initial value *is* rather mingy (as you point out),
people with FF and the Web Developer tools can use 'Browser Default
Styles' from the Tools menu on many sites. For example try it on:

<http://www.sitepoint.com/>

and look at some of the paragraphs.

--
dorayme

Reply With Quote
  #17  
Old   
dorayme
 
Posts: n/a

Default Re: Line spacing not working - 10-29-2009 , 05:44 PM



In article <slrnheik1s.334.spamspam (AT) bowser (DOT) marioworld>,
Ben C <spamspam (AT) spam (DOT) eggs> wrote:

Quote:
On 2009-10-29, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote:
[...]
Line height *is* a bit tricky and it is best not to use it (except at
the body level - sans units - to slightly increase it for the reasons JK
gives) unless you understand a few basics about it in a bigger context
than: "putting *this* line-height *here* makes the distance between this
and that text on *my* browser seem about right...".

The reason it is OK to keep out of what can be a hornet's nest is that
*perfectly serviceable* line heights are naturally used by the browser.
These days, browsers use a hidden but very detailed default stylesheet
(like yours in the head of your doc, but much more comprehensive). These
stylesheets are the product of a lot of intelligence and it is only safe
to change the defaults if you are confident you can do better.

Line-height doesn't usually even appear in the default stylesheet. The
initial value (which is "normal") is fairly normal, and good enough for
most normal purposes.
Good point.

As with many other presentational matters, there are initial values set
by the browser via internal coding, sometimes in conjunction with user
preferences or options.

Perhaps it is not too unhelpful to *imagine* a detailed style sheet
where much more presentation is set out than is in fact. For example, to
guess a browser's default, one can usually hit the sweet spot by making
a css rule in your own sheet and see what value makes no difference.
These values are the ones in the great big imaginary default sheet. Yes,
I know, this sheet does not really exist. But I like it and I grant it
honorary existence. <g>

--
dorayme

Reply With Quote
  #18  
Old   
Ben C
 
Posts: n/a

Default Re: Line spacing not working - 10-30-2009 , 04:13 AM



On 2009-10-29, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote:
Quote:
In article <slrnheik1s.334.spamspam (AT) bowser (DOT) marioworld>,
Ben C <spamspam (AT) spam (DOT) eggs> wrote:

On 2009-10-29, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote:
[...]
Line height *is* a bit tricky and it is best not to use it (except at
the body level - sans units - to slightly increase it for the reasons JK
gives) unless you understand a few basics about it in a bigger context
than: "putting *this* line-height *here* makes the distance between this
and that text on *my* browser seem about right...".

The reason it is OK to keep out of what can be a hornet's nest is that
*perfectly serviceable* line heights are naturally used by the browser.
These days, browsers use a hidden but very detailed default stylesheet
(like yours in the head of your doc, but much more comprehensive). These
stylesheets are the product of a lot of intelligence and it is only safe
to change the defaults if you are confident you can do better.

Line-height doesn't usually even appear in the default stylesheet. The
initial value (which is "normal") is fairly normal, and good enough for
most normal purposes.

Good point.

As with many other presentational matters, there are initial values set
by the browser via internal coding, sometimes in conjunction with user
preferences or options.
The initial values are all in the CSS specification, and the browser
_has_ to do those as printed (see the "full property table" in one of
the appendices).

Then for anything that differs from those values, there's the default
stylesheet, which is up to the individual browser, but usually mostly
the same, and the spec suggests a default stylesheet.

Observe that the default stylesheet does not set span to display:
inline-- it doesn't need to, because the initial value of display is
inline.

Reply With Quote
  #19  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: Line spacing not working - 10-30-2009 , 02:32 PM



Ben C wrote:

Quote:
The initial values are all in the CSS specification, and the browser
_has_ to do those as printed
We're in a wrong group... but anyway, the "_has_ to" part is misleading. The
initial values are just rock bottom defaults, and you cannot actually see
whether a browser "does" them, since a browser may apply a browser style
sheet without telling what it is.

Quote:
Then for anything that differs from those values, there's the default
stylesheet, which is up to the individual browser, but usually mostly
the same,
No it isn't. It's rather different.

Quote:
and the spec suggests a default stylesheet.
It presents it as descriptive _and_ (semi)normative, and in reality it's
neither. Most browsers mostly use something like it, but the "default
stylesheet" contains oddities and absurdities (partly not implemented in any
browser).

Quote:
Observe that the default stylesheet does not set span to display:
inline-- it doesn't need to, because the initial value of display is
inline.
And it would be most absurd to do otherwise.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Reply With Quote
  #20  
Old   
dorayme
 
Posts: n/a

Default Re: Line spacing not working - 10-30-2009 , 09:43 PM



In article <slrnhel82c.39n.spamspam (AT) bowser (DOT) marioworld>,
Ben C <spamspam (AT) spam (DOT) eggs> wrote:

Quote:
On 2009-10-29, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote:
In article <slrnheik1s.334.spamspam (AT) bowser (DOT) marioworld>,
Ben C <spamspam (AT) spam (DOT) eggs> wrote:

On 2009-10-29, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote:
[...]
....
As with many other presentational matters, there are initial values set
by the browser via internal coding, sometimes in conjunction with user
preferences or options.

The initial values are all in the CSS specification, and the browser
_has_ to do those as printed (see the "full property table" in one of
the appendices).

The actual values set as 'normal' get to be decided, I was supposing, by
the browser via internal coding, sometimes in conjunction with user
preferences or options. Are we talking at cross purposes?

(Btw, it is hard to know which is the right group for this topic as it
is really about a number of issues that straddles HTML authoring and
CSS. Perhaps alt.html? Anyway, perhaps too late.)

A useful fiction to buy out of having to know the details of how
browsers are made and operate: A browser produces an output only with a
virtual master CSS sheet. In this sheet are all the styles down to as
exact a value as possible. This sheet can be overridden of course by
author or user sheets.

Now, to go into something, in FF, if you can, try:

<http://dorayme.netweaver.com.au/anything.html>

Open the web developer facilities and go to Edit CSS, stick in a style
on body for line-height. I have Geneva 16 set for my normal sans-serif
and if I set body {line-height: 1.36} I get about the same look as me
not setting any line-height. What do you want to say about where the
line height is being supplied from in the case? I am happy with my rich
fictitious master sheet that is very far from the minimalist:

<http://www.w3.org/TR/CSS21/sample.html>

Note how grabbing all this and making an explicit set of styles in the
head of anything.html, leaves the show virtually unchanged. Meaning
partly that this example sheet is certainly very congruent with the one
that FF actually operates with, it may even be exactly the same.

There is a menu item under Disable Styles that reads Browser Default
Styles. Tick this and see what happens to the line height. Now it is a
mingy thing! Where is this coming from? It is coming presumably from
browser coding. It looks like 'line-height: 1;' To see this, open a
couple of tabs. In one tick the Browser Default Styles, in the other
simply add under Edit CSS, body {line-height:1;}. Compare by eye.

--
dorayme

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 - 2009, Jelsoft Enterprises Ltd.