The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> html code break
mummys revenge
post Sep 21 2006, 06:43 PM
Post #1





Group: Members
Posts: 2
Joined: 21-September 06
Member No.: 195



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! biggrin.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Sep 21 2006, 06:55 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



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>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Sep 21 2006, 07:28 PM
Post #3


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Sep 21 2006, 08:10 PM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Sep 21 2006, 11:50 PM
Post #5


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Sep 22 2006, 12:32 AM
Post #6


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



So what did you do?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Sep 22 2006, 12:37 AM
Post #7


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



Nothing fancy, but
CODE
p:first-letter {
    font-size: 200%;
    color: red;
}
worked fine for me.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Sep 22 2006, 12:42 AM
Post #8


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Sep 22 2006, 12:44 AM
Post #9


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



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. sad.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Sep 22 2006, 03:00 AM
Post #10


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Sep 22 2006, 03:08 AM
Post #11


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



I thought he wanted the W on its own "line" but maybe I interpreted the subject wrongly. huh.gif

Hey, mummys revenge. What do you want to do with the W?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Sep 22 2006, 05:41 AM
Post #12


.
********

Group: WDG Moderators
Posts: 9,630
Joined: 10-August 06
Member No.: 7



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.


This post has been edited by Christian J: Sep 22 2006, 06:43 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
mummys revenge
post Sep 22 2006, 12:13 PM
Post #13





Group: Members
Posts: 2
Joined: 21-September 06
Member No.: 195



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.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Sep 22 2006, 12:16 PM
Post #14


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



Ah, maybe I was just seeing it float. Sorry for any confusion.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Sep 22 2006, 12:23 PM
Post #15


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th March 2024 - 03:29 PM