It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming CSS Forum

Problem with link style

Problem with link style

Postby jayaramgussy on Wed Jul 11, 2007 1:12 pm

Hi,
I have created a HTML with stylesheet

<style>
#button {
width:50px;
}
.button
{
background-color :EC870E;
FONT-SIZE: 8pt;
color: #FFFFFF;
FONT-FAMILY: Arial, Helvetica, Sans-Serif;
font-weight: bold;
height : 16pt;
}
.contentBody
{
FONT-WEIGHT: normal;
FONT-SIZE: 10pt;
COLOR: #000000;
FONT-FAMILY: Arial, Helvetica, sans-serif
}
.LegendText
{
FONT-WEIGHT: normal;
FONT-SIZE: 8pt;
COLOR: black;
FONT-FAMILY: Arial, Helvetica, Sans-Serif;
}
.FormMargin
{
margin-right: 10px;
margin-left: 10px;
}
</style>

and i am using class to call this styles. its working fine.
But My friend says to create same look & feel without style tags.
So, i have removed CSS codings. and alternatively i have used:

<table title="Related Links" width="185" border="0" cellpadding="0" cellspacing="0" Style="BORDER-RIGHT: #666666 1px solid; PADDING-RIGHT: 0.1em; BORDER-TOP: #666666 1px solid;
PADDING-LEFT: 0.1em; FONT-SIZE: 8pt; PADDING-BOTTOM: 0.1em; BORDER-LEFT: #666666 1px solid; COLOR: #000000; PADDING-TOP: 0.1em; BORDER-BOTTOM: #666666 1px solid; FONT-STYLE: normal; FONT-FAMILY: Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #efefef;">


<font style="FONT-WEIGHT: normal; FONT-SIZE: 9pt; COLOR: #000000; FONT-FAMILY: Arial, Helvetica, sans-serif" >Welcome to my site</font>

These also working fine.

But how can use the following CSS codings and where can i use it?

A:link
{
COLOR: #006fa6;
TEXT-DECORATION: underline
}
A:visited
{
COLOR: #006fa6;
TEXT-DECORATION: underline
}
A:active
{
COLOR: #45adc6;
TEXT-DECORATION: underline
}
A:hover
{
COLOR: #45adc6;
TEXT-DECORATION: underline
}

Please give me your valuable solutions. Thanks
jayaramgussy
 
Posts: 5
Joined: Tue Jun 19, 2007 9:08 am

Postby dazz_club on Thu Jul 12, 2007 4:28 pm

to use

Code: Select all
A:link
{
COLOR: #006fa6;
TEXT-DECORATION: underline
}
A:visited
{
COLOR: #006fa6;
TEXT-DECORATION: underline
}
A:active
{
COLOR: #45adc6;
TEXT-DECORATION: underline
}
A:hover
{
COLOR: #45adc6;
TEXT-DECORATION: underline
}


you could insert this in your body tag of your style sheet. So when you create a link, by default this is how the links will be styled, unless you specify otherwise.

hope that helps :)
User avatar
dazz_club
250+ Club
 
Posts: 313
Joined: Fri Jul 15, 2005 7:35 am
Location: Chester and Hull

Postby knifeinback on Fri Jul 27, 2007 11:04 am

One tip.
Don't get into a habbit of defining things in caps.
HTML is going to get a lot stricter in the future.
User avatar
knifeinback
100+ Club
 
Posts: 136
Joined: Fri Jul 27, 2007 10:41 am
Location: 4170: Brisbane


Who is online

Users browsing this forum: No registered users and 0 guests