PDA

View Full Version : large first capital


gtlanz
05-07-2007, 08:32 AM
Hi
i would like to make the first Capital larger in a h1 div.
any help.
Thanks

#content h1 {
text-align: left;
padding-right: 20px;
font: 150% Georgia, "Times New Roman", Times, serif;
color: #901602;

Andromeda
05-07-2007, 08:54 AM
something along the lines of this:

css=
.bigger {font:bold 400%;}

html=
<h1><span class="bigger">T</span>his is a heading with a big first letter.</h1>

edbr
05-07-2007, 08:59 AM
you would have to assign the letter to a span class I think

Andromeda
05-07-2007, 09:47 AM
you would have to assign the letter to a span class I think

You mean the T - the letter I want to make bigger????
I did. Or am I misunderstanding you?

chriskq
05-07-2007, 10:03 AM
yes thats pretty much it. just tidied up a bit better


h1 {
font: normal 1em Georgia,verdana,arial,verdana,sans-serif;
}

h1 span {
font: bold 2em Georgia,verdana,arial,verdana,sans-serif;
}

<h1><span>T</span>his Heading</h1>

Andromeda
05-07-2007, 10:12 AM
Much tidier! :smile:

d a v e
05-07-2007, 06:19 PM
or even tidier still use the first-letter pseudo-element

http://www.w3.org/TR/CSS21/selector.html#first-letter

gtlanz
05-07-2007, 08:11 PM
Span worked fine and looks very tidy .
Thanks guys.