•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 422,800 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,358 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 14859 | Replies: 5
![]() |
•
•
Join Date: Aug 2004
Posts: 49
Reputation:
Rep Power: 5
Solved Threads: 1
To get rid of borders around link images add border="0" to the image.
The preferred method for changing link colours is using stylesheets. You'd use something like
a:link{text-decoration:none;color:#3366cc;font-weight:bold;}
a:visited{text-decoration:none;color:#6699ff;font-weight:bold;}
a:active{text-decoration:none;color:#3366cc;font-weight:bold;background-color:#cccc00;}
a:hover{text-decoration:none;color:#0000cc;font-weight:bold;background-color:#cccc00;}
You can use link, alink, and vlink on the body tag and it will still work in current browsers but the body tag option doesn't allow you to set the hover colour.
The preferred method for changing link colours is using stylesheets. You'd use something like
a:link{text-decoration:none;color:#3366cc;font-weight:bold;}
a:visited{text-decoration:none;color:#6699ff;font-weight:bold;}
a:active{text-decoration:none;color:#3366cc;font-weight:bold;background-color:#cccc00;}
a:hover{text-decoration:none;color:#0000cc;font-weight:bold;background-color:#cccc00;}
You can use link, alink, and vlink on the body tag and it will still work in current browsers but the body tag option doesn't allow you to set the hover colour.
•
•
Join Date: Nov 2003
Location: California
Posts: 204
Reputation:
Rep Power: 5
Solved Threads: 1
As felgall said, the preferred method of doing colours is via CSS (Cascading Style Sheets). You can also take the border off images via CSS also. Here is an example. My comments are marked out by /* & */.
a:link, a:visited { /* this defines unclicked, and clicked link properties */
text-decoration: none; /* you can set this to underline, or none. */
color: #000000; /* sets color, hexadecimal, right now it is black */
font-weight: bold; /* sets your font to bold. bold or none are most common here */
}
a:hover, a:active { /* defines mouseover, and clicked/processing links */
text-decoration: underline; /* set this to the opposite of what rested state links are for it to underline on mouseover */
color: #000000;
font-weight: bold;
}
img { /* defines the css for the <img> tag */
border: 0px; /* set border width to 0 pixels */
}•
•
Join Date: Mar 2004
Posts: 57
Reputation:
Rep Power: 5
Solved Threads: 0
Ok thanks, i sort of understand but have never used css before, the image is the only one on the page and there isn't very many links, so if css does what i think it does, i don't think its nessasary here.
Just to be clear, i don't want to get rid of the border around an image, i have allready done that, its when i set the image to a link that the border comes up
You probley have answerd my question but i just don't understand css.
Just to be clear, i don't want to get rid of the border around an image, i have allready done that, its when i set the image to a link that the border comes up
You probley have answerd my question but i just don't understand css.
•
•
Join Date: Oct 2004
Location: ~ In ur Heart ~
Posts: 28
Reputation:
Rep Power: 4
Solved Threads: 0
hey no coding is necessary, you can do this setting using the Microsoft Frontpage, select the image >> right click >> properties >> in the border size =2, enter the value as "0". thats it ! now the image thats linked wud not have any border lines !!
![]() |
•
•
•
•
•
•
•
•
DaniWeb HTML and CSS Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- CSS Footor - Please Stay at the Bottom!!! (HTML and CSS)
- HTML/CSS DIV help needed (HTML and CSS)
- I need help with my website. Using Dreamweaver. (JavaScript / DHTML / AJAX)
- Need help with directory displayer code (PHP)
Other Threads in the HTML and CSS Forum
- Previous Thread: What Am I Doing Wrong?
- Next Thread: Need Help with CSS Attributes


Linear Mode