| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| NamePros Regular | OK the scenerio is, I use external CSS to format text in my webpages. to style my links i create one class like this a { tags } and this get applied to whole page. The problem: Now i want to keep default style for links but also want to use different style for the links in header section only, so how to do this?
__________________ VIVSIN | NatGeo for WebMasters Visit : My Web Development Blog :kickass: This is where I started, This is where I will end. NAMEPROS = :kickass: |
| |
| | #2 (permalink) |
| Munky Designs | you can wrap them in tags, so for instance: <div id="header"> <a href="blah">link</a> </div> then have in the css: #header .a{ link styling } that will work, or I think you can do this: <a href="blah" class="linkclass">link</a> then in the css .linkclass{ link style }
__________________ |
| |
| | #3 (permalink) |
| Senior Member | Here is a working example which you can just paste into a file and modify to your needs. HTML Code: <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <title>Changing links.</title> <style>a { text-decoration: underline; color: green; } #header a { text-decoration: none; color: blue; }</style> </head> <body> <div id="header"><a href="http://www.namepros.com">NamePros.com</a></div> <br /> <br /> <a href="http://www.google.com">Google.com</a> </body> </html> Code: #header a:active, #header a:visited { ... }
Code: #idhere tag { ... }
#header input { background-color: #ff6600; }
__________________ Fused Hosting Simplicity and Superiority. █████████████████████████████████████████████ Affordable web hosting solutions; shared, reseller, shoutcast, WHMSonic, proxy, dedicated and more! My computer is broken; new components have been ordered. ![]() |
| |
| | #4 (permalink) |
| NamePros Regular | SOLVED, thank you everyone.
__________________ VIVSIN | NatGeo for WebMasters Visit : My Web Development Blog :kickass: This is where I started, This is where I will end. NAMEPROS = :kickass: |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |