mummys revenge
Sep 21 2006, 06:43 PM
Can anyone tell me, since we had to break up the "W" in Welcome, due to web design, will that matter as far as a search engine goes, will it reckognize at the word welcome or 2 words the "W" and "elcome"?
<!-- #BeginEditable "title" -->
<div class="titleLeft">
W
</div>
<div class="titleRight">
elcome
</div>
<!-- #EndEditable -->
THANKS!
pandy
Sep 21 2006, 06:55 PM
Not that I know for sure, but I would assume two words since DIV is block level. Much the same as putting the W in its own paragraph. Why don't you use a more appropriate element than DIV for the whole welcome, a SPAN for the W and CSS for layout? Since I don't know the context I don't know if a heading or a para would be the best choice, but let's assume a para.
<p>
<span style="display: block">W</span>elcome</p>
Darin McGrew
Sep 21 2006, 07:28 PM
I'm not sure what search engines and the like do now, but in the past, they treated all those examples as two words: "W" and "elcome"
Can you use the CSS first-letter pseudo-element for this? That leaves your markup intact, but allows you to style the first letter differently.
pandy
Sep 21 2006, 08:10 PM
I didn't know that. Bummer.
I don't think first-letter works. It's supposed to be possible to use for example line-height and margins with it, but last I checked browsers didn't agree.
Darin McGrew
Sep 21 2006, 11:50 PM
I just tried a simple test with p:first-letter and Opera 9.01, FireFox 1.0.2, and MSIE 6.0 all did the right thing with it.
pandy
Sep 22 2006, 12:32 AM
So what did you do?
Darin McGrew
Sep 22 2006, 12:37 AM
Nothing fancy, but
CODE
p:first-letter {
font-size: 200%;
color: red;
}
worked fine for me.
Darin McGrew
Sep 22 2006, 12:42 AM
I just tried
CODE
p:first-letter {
font-size: 300%;
color: red; background: green;
display: block;
float: left; clear: left;
padding: .25em;
}
and it worked in the same three browsers.
pandy
Sep 22 2006, 12:44 AM
Yes, but that doesn't look like a line break. A negative top margin or possibly increased line-height combined with vertical-align would, but they don't work.
Darin McGrew
Sep 22 2006, 03:00 AM
I really have no idea what the OP wanted to do. Maybe browsers will support it. Maybe they won't. But to me it looks like the first-letter pseudo-element is fairly well supported, so there shouldn't be a need to split up the first word of a paragraph just to do something special with the first letter.
pandy
Sep 22 2006, 03:08 AM
I thought he wanted the W on its own "line" but maybe I interpreted the subject wrongly.
Hey, mummys revenge. What do you want to do with the W?
Christian J
Sep 22 2006, 05:41 AM
Regarding search engines I think the issue is moot, for who would search for such a common word as "Welcome"? Also it's often adviced not to write "welcome" at all on web pages, since it's redundant.
QUOTE(Darin McGrew @ Sep 22 2006, 07:42 AM)
I just tried
CODE
p:first-letter {
font-size: 300%;
color: red; background: green;
display: block;
float: left; clear: left;
padding: .25em;
}
and it worked in the same three browsers.
'display: block' is not listed at
http://www.w3.org/TR/CSS21/selector.html#first-letter , OTOH it says "UAs may apply other properties as well". I should add that my browsers don't support it either.
mummys revenge
Sep 22 2006, 12:13 PM
It is on a color box on a web page, and if you out the whole word together it messes up the line and looks bad. So if you seperate them it makes for a clean break.
QUOTE(Christian J @ Sep 22 2006, 05:41 AM)
Regarding search engines I think the issue is moot, for who would search for such a common word as "Welcome"? Also it's often adviced not to write "welcome" at all on web pages, since it's redundant.
QUOTE(Darin McGrew @ Sep 22 2006, 07:42 AM)
I just tried
CODE
p:first-letter {
font-size: 300%;
color: red; background: green;
display: block;
float: left; clear: left;
padding: .25em;
}
and it worked in the same three browsers.
'display: block' is not listed at
http://www.w3.org/TR/CSS21/selector.html#first-letter , OTOH it says "UAs may apply other properties as well". I should add that my browsers don't support it either.
Darin McGrew
Sep 22 2006, 12:16 PM
Ah, maybe I was just seeing it float. Sorry for any confusion.
pandy
Sep 22 2006, 12:23 PM
QUOTE(mummys revenge @ Sep 22 2006, 07:13 PM)
It is on a color box on a web page, and if you out the whole word together it messes up the line and looks bad. So if you seperate them it makes for a clean break.
I still don't get it. So do you want the W on its own line or not?
W
elcome
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.