473,224 Members | 1,685 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,224 software developers and data experts.

line-height question..

hi,

what is best way of doing this.. I have a bunch of headlines, one after
the other, thus:

<div class="headlines">
Article Headline goes here lorem ipsum viderer<br>
Article Headline goes here lorem ipsum viderer<br>
Article Headline goes here lorem ipsum viderer goes here lorem
ipsum viderer<br>
Article Headline goes here lorem ipsum viderer<br>
Article Headline goes here lorem ipsum viderer goes here lorem
ipsum viderer<br>
</div>

I want line-height to apply BETWEEN headlines, not WITHIN headlines (as
some headlines will no doubt be longer than one line..) what is best way
of doing this, please.. css:

..headlines {font-size:14px; line-height:20px; }

do I have to do one div per headline... I'm hoping there's a better way..

thank you very much..
Nov 6 '07 #1
3 2746
maya wrote:
what is best way of doing this.. I have a bunch of headlines, one after
the other, thus:
You say they are headlines. Headers. Use a proper element.

<h2>Article Headline goes here lorem ipsum viderer</h2>
<h2>Article Headline goes here lorem ipsum viderer</h2>
<h2>Article Headline goes here lorem ipsum viderer goes here lorem
ipsum viderer</h2>
<h2>Article Headline goes here lorem ipsum viderer</h2>
<h2>Article Headline goes here lorem ipsum viderer goes here lorem
ipsum viderer</h2>
.headlines {font-size:14px; line-height:20px; }
h2 { font-size:140%; }

Don't use pixels for sizing.
http://k75s.home.att.net/fontsize.html

--
-bts
-Motorcycles defy gravity; cars just suck
Nov 6 '07 #2
On 2007-11-06, maya <ma********@yahoo.comwrote:
hi,

what is best way of doing this.. I have a bunch of headlines, one after
the other, thus:

<div class="headlines">
Article Headline goes here lorem ipsum viderer<br>
Article Headline goes here lorem ipsum viderer<br>
Article Headline goes here lorem ipsum viderer goes here lorem
ipsum viderer<br>
Article Headline goes here lorem ipsum viderer<br>
Article Headline goes here lorem ipsum viderer goes here lorem
ipsum viderer<br>
</div>

I want line-height to apply BETWEEN headlines, not WITHIN headlines (as
some headlines will no doubt be longer than one line..) what is best way
of doing this, please.. css:

.headlines {font-size:14px; line-height:20px; }

do I have to do one div per headline...
Why not?

If you don't want to then you could do this:

br { display: block; margin-top: 20px; }
I'm hoping there's a better way..
What's wrong with the extra elements?
Nov 6 '07 #3
maya wrote:
hi,

what is best way of doing this.. I have a bunch of headlines, one after
the other, thus:

<div class="headlines">
Article Headline goes here lorem ipsum viderer<br>
Article Headline goes here lorem ipsum viderer<br>
Article Headline goes here lorem ipsum viderer goes here lorem ipsum
viderer<br>
Article Headline goes here lorem ipsum viderer<br>
Article Headline goes here lorem ipsum viderer goes here lorem ipsum
viderer<br>
</div>

I want line-height to apply BETWEEN headlines, not WITHIN headlines (as
some headlines will no doubt be longer than one line..) what is best way
of doing this, please.. css:

.headlines {font-size:14px; line-height:20px; }

do I have to do one div per headline... I'm hoping there's a better way..
Well let's see your have a list of headlines...why are your not using a
list?? Also line-height is the "height of the line" of text, of course
is would not be added "between"! That is the function of margins and
padding.

BETTER:

/* adjust to suite */
ul.headlines {
margin: .5em; padding: 0; list-style: none; font-size: 1.5em;
}
ul.headlines li { margin: 0 .5em; }
<ul class="headlines">
<li>Article Headline goes here lorem ipsum viderer</li>
<li>Article Headline goes here lorem ipsum viderer</li>
<li>Article Headline goes here lorem ipsum viderer goes here lorem
ipsum viderer</li>
<li>Article Headline goes here lorem ipsum viderer</li>
<li>Article Headline goes here lorem ipsum viderer goes here lorem
ipsum viderer</li>
</ul>
--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Nov 6 '07 #4

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

Similar topics

19
by: les_ander | last post by:
Hi, suppose I am reading lines from a file or stdin. I want to just "peek" in to the next line, and if it starts with a special character I want to break out of a for loop, other wise I want to...
8
by: Peter A. Schott | last post by:
Per subject - I realize I can copy/paste a line at a time into an interactive session when I'm trying to debug, but was wondering if there is any tool out there that allows me to copy sections of...
3
by: Double Echo | last post by:
Hi all, I'm using PHP 4.4.2, and use PHP on both the command-line and the web. I am running PHP on SuSE 10 Linux , in a VMware 5.5 workstation, using Apache 2.0.55 , on my Dell laptop. ...
6
by: magix | last post by:
Hi, when I read entries in file i.e text file, how can I determine the first line and the last line ? I know the first line of entry can be filtered using counter, but how about the last line...
6
by: Jacob Rael | last post by:
Hello, I have a simple script to parse a text file (a visual basic program) and convert key parts to tcl. Since I am only working on specific sections and I need it quick, I decided not to...
14
by: WStoreyII | last post by:
the following code is supposed to read a whole line upto a new line char from a file. however it does not work. it is producing weird results. please help. I had error checking in there for...
3
by: amitp | last post by:
Can anyone tell me how can i break a line in MS WORD doc thru VB 6.0 application? I'm replacing the field values with the data from the databse in MS WORD doc. One of my field value is ( "Jan tst....
0
by: 7stud | last post by:
Hi, 1) Does this make any sense: """ Thus, the loop: for line in f: iterates on each line of the file. Due to buffering issues,
11
by: xdevel | last post by:
Hi, I don't understand option. if I write: #line 100 "file" I change file numeration to start to line 100 but what "file" ? any example?
19
by: =?Utf-8?B?QnJpYW4gQ29vaw==?= | last post by:
This is an example of the data; 2007/07/27 11:00:03 ARES_INDICATION 010.050.016.002 404.2.01 (6511) RX 74 bytes 2007/07/27 11:00:03 65 11 26 02 BC 6C AA 20 76 93 51 53 50 76 13 48...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.