CSS and first-letter

D

Dan Marino

hi everyone

at the moment, i use these classes in my stylesheet

..name {
font-family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 52px;
color: #DCCCAB;
}

..name:first-letter {
color: #5C5543;
}

so the first letter of my paragraph is in #5C5543 color, and the rest of
the paragraph in DCCCAB color. ok.

is there any way to tell my CSS not "write the first letter of this
paragraph in a different color" but "write the first letter OF ALL THE
WORDS of this paragraph in a different color"?

thanks in advance
d.
 
P

patrick j

is there any way to tell my CSS not "write the first letter of this
paragraph in a different color" but "write the first letter OF ALL THE
WORDS of this paragraph in a different color"?

I don't know if there is any form of tag or CSS instruction which will
do that.

If you are using a text editor with GREP (Global Regular Expression
Parsing) then you could create a fairly simple find/replace expression
which would put tags around the first letter of every word in the
paragraph then you would be able to create an instruction for those
tags in CSS.
 
D

Dan Marino

I don't know if there is any form of tag or CSS instruction which will
do that.

ok
alternative question

if i use an absolute positioning for a class .MyClass1 paragraph, is there
any way to tell my CSS to write a class .MyClass2 paragraph at the same
height of a paragraph and - as an example - 10 pixel far from the end of
the first?

i need - in other words - to have this effect:

First_name Second_name

where
a) the "F" and the "S" must be in a different color
b) First_name has an absolute positioning (but i DO NOT know in advance
the width of Firs_name, so i cannot use absolute positioning for
Second_name too)

thanks again
d.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top