Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-13-2008, 11:52 AM   PM User | #1
kryssy23
New Coder

 
Join Date: Nov 2008
Location: Melbourne, Australia
Posts: 69
Thanks: 8
Thanked 1 Time in 1 Post
kryssy23 is an unknown quantity at this point
links in css

I have never done this before, so I dont know if its possible... but can you create a link using css. I have a banner img and I want the img to link back to the news page. I have 25 or so pages so I really cant be bothered going through and linking them by hand.

Code:
#banner {background-color:#000000; width:600px; height:100px; background-image:url(logo.png); background-repeat:no-repeat;}
any ideas?
kryssy23 is offline   Reply With Quote
Old 11-13-2008, 12:14 PM   PM User | #2
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,678
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Quote:
but can you create a link using css.
Impossible. CSS is only capable to add some styles to an element, and not capable to add/remove an attribute or an html element.

If you can depend upon some javascript, then it may be possible.
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

Last edited by abduraooft; 11-13-2008 at 12:17 PM..
abduraooft is offline   Reply With Quote
Users who have thanked abduraooft for this post:
kryssy23 (11-13-2008)
Old 11-13-2008, 12:22 PM   PM User | #3
kryssy23
New Coder

 
Join Date: Nov 2008
Location: Melbourne, Australia
Posts: 69
Thanks: 8
Thanked 1 Time in 1 Post
kryssy23 is an unknown quantity at this point
ok thanks for that.. thought as much..
kryssy23 is offline   Reply With Quote
Old 11-13-2008, 05:10 PM   PM User | #4
Donkey
Regular Coder

 
Donkey's Avatar
 
Join Date: Sep 2003
Location: Blackfield UK
Posts: 309
Thanks: 1
Thanked 35 Times in 35 Posts
Donkey is an unknown quantity at this point
Why not put the image and it's link inside a server side include and include it in every page, then you only have to change the link once.
__________________
" 90% of everything is crud" - Theodore Sturgeon
Filthy Beast - a 60's Rock Band
Donkey is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:44 PM.


Advertisement
Log in to turn off these ads.