Table text (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


DaAngel -> Table text (6/29/2003 4:07:44)

Ok, it' s been a while since I have used CSS,

[:(]since I had to do real work, I ain' t had much time for web design.

CSS, is there a quick and easy way to hightlight text in a table using CSS, given that the table uses a class already. Can this be done without using span.

Shuffles my feet, say for ....oh I don' t know........example, I used this code.....

<table width=" 100%" cellspacing=" 0" cellpadding=" 0" >
<tr>
<td>    and No Blank Space Please      </td> the & and nbsp;
<td width=" 500" align=" center" valign=" top" class=" maintext" >
Successful web site design takes much more than a few words and pictures. At North
Carolina Web Design we don' t believe in leaving web design to halfhearted
guesswork. Soliciting and collecting information from our clients gives us a head
start in their web design. To aid the web design process we encourage our clients
to have a brief idea of the type of web presence they require. Overlooking even one
or two key aspects of web site design can result in many missed opportunities.
</td>
</table>

Is there an easy way without using span to highlight some text using CSS.




Boo -> RE: Table text (6/29/2003 4:27:25)

<div>




DaAngel -> RE: Table text (6/29/2003 5:12:00)

No thanks, I may as well use the font tag..if I want to go down that road.....




paperfish -> RE: Table text (6/29/2003 8:11:05)

DaAngel,

Do you want to format all the text in a cell or format selected words/ phrases in the text?

To format all the text in a cell:
I create a class in my CSS and then select that class from the style drop box (Normal View). On this project, some of the templates have six different tables so I use relatively long names to make it easier for developers to select the correct style - and safer for me if I have to edit the CSS (e.g. sopintror1c1 and sopancol4).

To format selected words and phrases:
I create a class in my CSS and then insert the tags by hand in HTML view. I don' t think there is a way to do this in Normal view but one of the forum' s gurus may know how.

BTW, you can also manage your table properties with CSS - a life-saver if the client wants to change the appearance.

Cheers




abbeyvet -> RE: Table text (6/29/2003 17:01:26)

quote:

No thanks, I may as well use the font tag..if I want to go down that road.....


Huh? I don' t understand that at all.

The font tag is deprecated, but ' div' is an integral part of both HTML 4 and XHTML and is a cornerstone of designing with CSS.


quote:

To format selected words and phrases:
I create a class in my CSS and then insert the tags by hand in HTML view. I don' t think there is a way to do this in Normal view but one of the forum' s gurus may know how.


I use spans.

If you enter it as span.name in your style sheet it will appear in the dropdown styles list in FP.

I often use this to provide, for example, a span used to style each instance of a company' s name. You just select the company name any time, find the style in the list and apply.

For example this site: http://www.intradyn.com

uses this in the stylesheet:

span.intra{font-weight:bold;color:#04b7bb;font-variant:small-caps;}
span.dyn{font-weight:bold;color:#0fc61d;font-variant:small-caps;}

and this in the HTML:

<span class=" intra" >Intra</span><span class=" dyn" >Dyn</span>

to style the company name.




DaAngel -> RE: Table text (6/29/2003 19:16:01)

Uhmm.......[&:]

wouldn' t

.intra{font-weight:bold;color:#04b7bb;font-variant:small-caps;}
.dyn{font-weight:bold;color:#0fc61d;font-variant:small-caps;}

work as well.....or am I missing something?




abbeyvet -> RE: Table text (6/30/2003 4:09:11)

Yep, would work just as well but would not then show up in the styles drop down menu.

I just find it handy to have it appear there especially with a span that is very frequently used. Makes it quicker to apply than having to go into the html each time.




paperfish -> RE: Table text (6/30/2003 7:44:29)

abbeyvet,

As usual, you had the answer - now I know how to style a word or phrase in Normal view.

Thank you
Bill




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.078125