PDA

View Full Version : css help


kavan
02-11-2006, 05:54 PM
hello,
i am a newbie in web designing using dreamweaver. i need some help about designing my website. whenever i wanna a page i first go to modify> page properties and select the apperance of default text, link and rollover peoperties. But When i want to use smaller fonts on the bottom of site i just make a new style and it works fine. but as soon as i link them to the other pages the size of the links becomes large and equal to the default size specified in page properties. can anyone tell me how can i create rollover properties like underline on rollover, hide underline on rollover etc. for specific font styles. Thanks

ramandeep
02-11-2006, 06:22 PM
Hi Kavan,
Now to do it with CSS it depends how you want to do it by embedding a Stylesheet in your web page or creating a external stylesheet.
I will suggest external stylesheet where you define all your styles and then just link your webpages to it.

Here's how it works: Create your Web page normally and use the <link> tag within the <head>, like so:

<html>
<head>
<title>My Webpage </title>
<link rel=stylesheet href="styles.css" type="text/css">
</head>
<body>
<h1>I am using CSS</h1>


this is a paragraph content</P>
</body>
</html>


Now create a separate text file called styles.css and give styles as you want.I have given styles only to <h1> and

tags you can give as per your requirements.

H1 {
color: green;
font-family: impact
}
P {
background: yellow;
font-family: courier
}



For underlining you can use

text-decoration:underline;

To learn more you can visit
http://www.w3schools.com/css/default.asp

Hope this will help.

kavan
02-11-2006, 07:09 PM
thanks for your answer. plz look at my question again

<style type="text/css">
<!--
body,td,th {
font-family: Trebuchet MS;
font-size: 13px;
color: #000000;
}
body {
background-color: #FCFCFC;
margin-left: 15px;
margin-top: 10px;
margin-right: 15px;
margin-bottom: 0px;
}
h1,h2,h3,h4,h5,h6 {
font-family: Trebuchet MS;
}
h1 {
font-size: 18px;
color: #333333;
}
h2 {
font-size: 16px;
color: #333333;
}
a {
font-family: Verdana;
font-size: 12px;
color: #000000;
}
a:link {
text-decoration: underline;
}
a:visited {
text-decoration: underline;
color: #000000;
}
a:hover {
text-decoration: none;
color: #000000;
}
a:active {
text-decoration: underline;
color: #000000;
}
.footer {
font-family: Verdana;
font-size: 10px;
}
-->
</style>

this is my stylesheet which i am using now in dreamweaver but whn i write somethning in footer syle and hyperlink it in dreamweaver its font changes to 12 Verdana. i want to have specific rollover and linking peoperties when ever i link footer.

ramandeep
02-11-2006, 08:37 PM
when you hyperlink it,then this comes into action

a {
font-family: Verdana;
font-size: 12px;
color: #000000;
}


Remove font-size: 12px; if you dont want your hyperlinks to be 12px.

domedia
02-11-2006, 10:10 PM
or just add a few special lines of css code to target you footer links :
.footer a { font-size: 10px;}
.footer a:link { color: #ccc;}
.footer a:visited { color: #ccc;}
.footer a:hover { color: red;}
.footer a:active { color: #ccc;}

Change the colors to match your design of course :)