Links to Match your Site
This is HOW I got started using CSS to design my websites.
My very first website was green, red and white. I had hyperlinks on the pages that were the “default” bright blue. Being an aesthetic kind of person, that bright blue color looked gawd-awful. While I was surfing around the Internet I found some pages that had links on them, but, guess what? They were NOT bright blue. I had to find out how they did that.
I “viewed the source” and discovered some weird “style” stuff in the <head> of the web page. So, painfully, I copied the code letter by letter and applied it to my webpage. EUREKA - No more ugly blue links! I must admit, it was NOT an easy process. It took me a whole day to complete the task, and it didn’t work a whole bunch of times I tried it, but, I was intrigued by the concept of putting the code formatting away from the main content <body> of the web page.
This is how I began designing web pages with CSS instead of convoluted table tags.
Here’s the code to create varying types of links (anchors) on your web sites. color = the color of the text and the underline. If you want different colors for the link and the link when hovered over - a:hover - then just change the hexidecimal code for the color.
<style type=”text/css”>
a, a:visited
{
color:#c20808;
text-decoration:none;
border-bottom:1px dotted #c20808;
padding-bottom:2px;
}
a:hover
{
color:#000;
border-bottom:1px dotted #000;
}
</style>
All the Best from the West,
Claire Poulton
No Comments »
Leave a Reply
You must be logged in to post a comment.




















