Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strong style and linked text size

Status
Not open for further replies.

DavidArchibald

IS-IT--Management
Oct 29, 2000
20
0
0
NZ
I'm relatively new with CSS so apologies is this is obvious.

We have a new site with defined styles for <p> and <a> and <div> style for strong. P and a text is displayed at 12 px while strong is displayed at 14 px.

The problem is obvious - text that is strong and hyperlinked is displayed at 12 px which has a very unpleasant impact on the aesthetics!

What I need is a style that will display strong linked text at 14 px.

Thanks for any help you can give.
 
Hi,

Do this:

<STYLE TYPE=&quot;text/css&quot;>
p {font-family: Arial; font-size: 12px; color: #000000;}
div {font-family: Arial; font-size: 12px; color: #000000;}
a {font-family: Arial; font-size: 14px; color: #0000FF;}
</STYLE>

Those attributes set above will be the set attributes for all <P>, <DIV>, & <A> tags.

To specify seperate classes for multiple links or multiple <P>'s or whatever then do this:
<STYLE TYPE=&quot;text/css&quot;>
p.class1 {font-family: Arial; font-size: 12px; color: #000000;}
p.class2 {font-family: Times; font-size: 10px; color: #FF0000;}
div {font-family: Arial; font-size: 12px; color: #000000;}
a {font-family: Arial; font-size: 14px; color: #0000FF;}
</STYLE>

In that example the <DIV> & <A> tags will all be the same, however for the <P> tags you will have to specify which class you are using:
<P CLASS=&quot;class1&quot;>some text</P>
<P CLASS=&quot;class2&quot;>some text under a different class</P>

Lastly, if you have specified a class in a stylesheet and wish to change one thing in a <P> tag but only wish to do it once, you have the option to include the STYLE in the <P> tag (or any other tag for that matter).

<P STYLE=&quot;color: #000000; font-family: Verdana; font-size: 16px;&quot;>some text with the style embedded into the tag.</P>

When you embed the STYLE attribute into a tag it will over-write anything else that may be specified in the regular stylesheet found between the <HEAD></HEAD> tags.

For more info on CSS see or
Hope this helps!
greenjumpy.gif
NATE
design@spyderix-designz.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top