Forum Moderators: not2easy
<b><font size="+4">B</font>
<font size= "+2">LACK</font>
<font size ="+4"> W</font>
<font size="+2">IDGET</font>
<font size="+4"> R</font>
<font size="+2">EVIEW</font></b>
How do I acheive the same effect using CSS? Only w/o the extra spaces that are my SERPS?
It currently shows as B LACK W IDGET R EVIEW which doesn't look bad but means I make first page for "Lack Idget" and am not to be found for "Black Widget".
I want to change to using an <H1> there, but would like to keep making the first letters taller than the others. Can CSS do that?
Thanks.
More at W3C
[w3.org...]
In your CSS file add:
.BigLetter {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 16px;
font-style: normal;
}
Then simply Highlight the first letter of the word and assign it a class:
<p>
<span class="BigLetter">B</span>lack <span class="BigLetter">W</span>idget <span class="BigLetter">R</span>eview
</p>
You also want your <P> tag defined. That way you don't need to use the font tag at all. In css you really don't even need a font tag ever.
p {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-style: normal;
font-weight: bold;
font-size: 12px;
}
p strong {font-size: 16px;}
And then write:
<p>
<strong>B</strong>lack
<strong>W</strong>idget
<strong>R</strong>eview
</p>
in your html document.
p:first-letter {blah blah}
At first it did, then didn't work for me, then, after an hour or so of bug killing, I realized that you *must* have a space between the selector and the first curly brace, or IE chokes:
p:first-letter{blah blah} -> Choke
p:first-letter {blah blah} -> Happy
<span class="big">B</span>lack
<span class="big">W</span>idget
If you do this, you'll still be in first place for "lack idget", because you're still splitting the words.
mipapage has the right method with the :first-letter pseudo-element. Note that it works in IE5.5+ only (as well as Mozilla, Opera, etc.).
Try something like:
CSS
==============================p {
font-size:medium;
}span.hilite:first-letter
{
font-size:xx-large
}==============================
HTML
==============================<p><span class="hilite">Black</span> <span class="hilite">Widgets</span></p>
==============================
That space problem, along with the 'stray comma' problem that strikes Mozilla, together are two sneaky little bugs...
Stray Comma => #my div p, #my div ul, {blah blah}