|
|
#1 |
|
New Member
![]() Join Date: Nov 2011
Posts: 3
|
hey everyone, i'm writing my CSS for a website and i forget how to do something and for the life of me can't remember. i want to set up the links within a certain class to have no border, but the links in the rest of the page to have a border. whenever i put the code highlighted with **** below in, it takes borders out of all my links. what is the correct syntax to reference only the links (a href) within a certain class?? thanks!
/*........................................ style sheet for pages other than misc ..........................................*/ body { display: block; background-color: #FFFFFC; border: grey; cursor: crosshair; } a:link, a:visited, a:hover, a:active { font-family: Miriam , Helvetica; font-size: 14px; color: grey; font-style: normal; text-decoration: none; border-style: solid; border-color: grey; border-width: 2px; margin: 5px; } .tabsDown , ul#tabsDown, li /* .tabsDown div, unordered list within */ { top: 5px; left: 20px; list-style-type:none; /*no bullets */ margin:0; padding-top:5px; padding-bottom: 5px; } h1 { text-align: center; font-family: Miriam, Helvetica; font-size: 18px; } .picLinks a , a:visted , a:hover , a:link { ****border-style: none;**** } |
|
|
|
|
|
#2 |
|
Diamond Member
![]() Join Date: Feb 2011
Location: Newcastle, Australia
Posts: 1,135
|
Code:
.piclinks a {
border:0;
}
__________________
if (headhurts == "possibly") { alert ("keep going!"); } else if (headhurts == "yes") { alert ("go to sleep"); } else if (headhurts == "damn !@#$ mofo scripts...") { alert ("give up and have a beer!"); } else { alert ("watch TV"); } Last edited by Phreaddee; 11-11-2011 at 08:25 PM. |
|
|
|
|
|
#3 |
|
New Member
![]() Join Date: Nov 2011
Posts: 3
|
now what's happening is that the .piclinks class is inheriting borders from before..what i'm going for is that the links are styled but that the pictures (which are also links) are totally static without borders..the site is davidctaylor.info if a visual helps
/*........................................ ****in style sheet for pages other than misc ..........................................*/ body { display: block; background-color: #FFFFFC; border: grey; cursor: crosshair; } a:link, a:visited, a:hover, a:active { font-family: Miriam , Helvetica; font-size: 14px; color: grey; font-style: normal; text-decoration: none; border-style: solid; border-color: grey; border-width: 2px; margin: 5px; } .tabsDown , ul#tabsDown, li /* .tabsDown div, unordered list within */ { top: 5px; left: 20px; list-style-type:none; /*no bullets */ margin:0; padding-top:5px; padding-bottom: 5px; } h1 { text-align: center; font-family: Miriam, Helvetica; font-size: 18px; } .picLinks a { border: 0; padding-left: 0; padding-right: 0; } |
|
|
|
|
|
#4 |
|
Diamond Member
![]() Join Date: Feb 2011
Location: Newcastle, Australia
Posts: 1,135
|
.piclinks img {
Border:0; }
__________________
if (headhurts == "possibly") { alert ("keep going!"); } else if (headhurts == "yes") { alert ("go to sleep"); } else if (headhurts == "damn !@#$ mofo scripts...") { alert ("give up and have a beer!"); } else { alert ("watch TV"); } |
|
|
|
|
|
#5 |
|
New Member
![]() Join Date: Nov 2011
Posts: 3
|
you're a life saver
|
|
|
|
![]() |
| Tags |
| css, nesting |
| Thread Tools | |
| Display Modes | |
|
|