473,479 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Header. Font Size and Line Height

Hello,

I created the following header:
http://www.27lamps.com/Beta/Typography/Typography.html

Where Font Size is the same as Line Height: 2.0em.

Shouldn't the border be next to the text?

Thanks,
Miguel
Aug 18 '08 #1
6 3697
shapper wrote:
I created the following header:
http://www.27lamps.com/Beta/Typography/Typography.html

Where Font Size is the same as Line Height: 2.0em.
No, both are declared using the same expression, but it has different
meanings.

For font-size, the em unit means the size of the font of the parent element.
Shouldn't the border be next to the text?
Even if you set line-height to 1em, making it equal the font size, the
border does not normally touch letters. Remember that the font size is the
total height of the font, normally encompassing ascenders, descenders, and
diacritic marks. A letter like "H" should be expected to have a height that
is notably less than the font size.

Actually if the text contains letters like "j" and "Å", those letters might
extend to the border (set for an element with line-height: 1em) and even a
little beyond. But most letters - for the Latin script at least - have
spacing below and above them.

Yucca

Aug 18 '08 #2
On Aug 18, 7:07*pm, "Jukka K. Korpela" <jkorp...@cs.tut.fiwrote:
shapper wrote:
I created the following header:
http://www.27lamps.com/Beta/Typography/Typography.html
Where Font Size is the same as Line Height: 2.0em.

No, both are declared using the same expression, but it has different
meanings.

For font-size, the em unit means the size of the font of the parent element.
Shouldn't the border be next to the text?

Even if you set line-height to 1em, making it equal the font size, the
border does not normally touch letters. Remember that the font size is the
total height of the font, normally encompassing ascenders, descenders, and
diacritic marks. A letter like "H" should be expected to have a height that
is notably less than the font size.

Actually if the text contains letters like "j" and "Å", those letters might
extend to the border (set for an element with line-height: 1em) and even a
little beyond. But most letters - for the Latin script at least - have
spacing below and above them.

Yucca
So should I use margin on a header to specify a top and bottom
spacing?

Thanks,
Miguel
Aug 18 '08 #3
shapper wrote:
So should I use margin on a header to specify a top and bottom
spacing?
Pardon? You quoted my entire message, so it is impossible to see how your
question relates to it and whether you understood any of it.

And taken in isolation, your question looks rather trivial. Spacing can be
achieved using margins or padding or both. What's so special here that you
need to ask?

Of course line-height can _also_ be used for spacing. What made you think it
could not? But it's not wise to use it for anything that can be achieved
using margin or padding, since line-height affects... well, line height,
i.e. _line_ spacing. This is quite important when the text may get divided
into two or more lines, as it usually can (there is no lower limit to window
width that people may use).

Yucca

Aug 18 '08 #4
In article
<06**********************************@m45g2000hsb. googlegroups.com>,
shapper <md*****@gmail.comwrote:
So should I use margin on a header to specify a top and bottom
spacing?
Use top and bottom padding.

--
dorayme
Aug 19 '08 #5
On 2008-08-19, dorayme <do************@optusnet.com.auwrote:
In article
<06**********************************@m45g2000hsb .googlegroups.com>,
shapper <md*****@gmail.comwrote:
>So should I use margin on a header to specify a top and bottom
spacing?

Use top and bottom padding.
I suppose on the assumption that he wants the spacing between the text
and the border.

But usually margins are a good choice because they collapse-- for
example bottom margin of H1 collapsing with top margin of the P that
follows it.
Aug 19 '08 #6
On Aug 19, 7:34*am, Ben C <spams...@spam.eggswrote:
On 2008-08-19, dorayme <doraymeRidT...@optusnet.com.auwrote:
In article
<0639b2bc-5410-4696-a2d0-fdf1e82cb...@m45g2000hsb.googlegroups.com>,
*shapper <mdmo...@gmail.comwrote:
So should I use margin on a header to specify a top and bottom
spacing?
Use top and bottom padding.

I suppose on the assumption that he wants the spacing between the text
and the border.

But usually margins are a good choice because they collapse-- for
example bottom margin of H1 collapsing with top margin of the P that
follows it.
Thank You!

I will use margin ... the borders where just a visualization helper.

Miguel
Aug 19 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2929
by: Paul D. Sullivan | last post by:
I've been trying to find out how to increase the font size in the text entry fields in Invision Power Board 1.3 for a while. The part where you enter your post and do the quick reply and all that...
4
4925
by: Eric Eggermann | last post by:
Hello all, I'm building an app that lays out and prints flash cards. Now the card might be any size, but when the user is working on the card, I draw the preview isotropically, as large as...
9
19479
by: Adam | last post by:
Can someone please help!! I am trying to figure out what a font is? Assume I am working with a fixed font say Courier 10 point font Question 1: What does this mean 10 point font Question 2:...
11
8303
by: Peter Wu | last post by:
Hello, I want to create a Header and Footer for every ASPX page I build. I created 2 Web user controls respectively and placed them in an ASPX page. The problem is that I cannot position the...
16
2428
by: maya | last post by:
I have heard so much preaching here about how font sizes should be set as percentages so users can change font-sizes on their browsers... ok, so now at work am working on a site where we need to do...
3
4290
by: guitar | last post by:
Hi, I have created a table, which has a stable header and a scroller for data. One of my data field has a combo box... Everything works fine but the combo moves over the header when scrolled... ...
1
19650
by: swc76801 | last post by:
I desperately need help. My understanding of CSS is non-existent. I have a store http://astore.amazon.com/texasheat-20 with Amazon.com. According to the information from Amazon.com "Write your own...
1
2771
by: Desser | last post by:
CSS Newbee. I need to have lesser space between the h1 and the paragraph text. My header is 28 pixels and the body text is 12 pixels. How do I do this? Here is my CSS:
3
5498
by: Noorain | last post by:
I designed a site. i want to header,footer,left & right column fixed but body information only scrolling. this site screen to be 800/600 px. i designed this way but when i used position fixed all...
0
7027
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6899
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7019
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7067
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5312
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4757
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
2970
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
555
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
166
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.