Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Proper image linking code for CSS
Old 10-01-2007, 06:39 PM Proper image linking code for CSS
Experienced Talker

Posts: 48
Name: Harold
Trades: 0
Hi, all. I need help with what I'm sure will be an easy task for most of you here. I'm new to CSS and I've got the following code working beautifully and now I need to make the image I specify below linkable. In short, I need http://myurl.com/image.jpg to link to http://myurl.com/index.htm. What is the extra piece of code that I need to add?

Above the </head>, I have:

<style type="text/css" media="screen">
body
{
image:
url('http://myurl.com/image.jpg')
}
body {margin:0px; padding:0px;}
img.y
{
position:absolute;
left:50%;
width:40px;
margin-top:-354px;
margin-left:252px;
padding:15px;
z-index:1000
}
</style>

and below the <body>, I have:

<img class="y" src=http://myurl.com/image.jpg width="198" height="26" alt="menu">
Hans G. is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-01-2007, 07:41 PM Re: Proper image linking code for CSS
Gx3 Grafix's Avatar
smile

Posts: 1,530
Name: Kimberly
Location: Houston, TX
Trades: 14
http://www.yourhtmlsource.com/stylesheets/csslinks.html

I found this tutorial that may be of some help to you. Scroll down to Image links.

This is the way my images are linked in one of the sites I'm working on. I just thought I'd double check and give you a source for the info.

Hope this helps.
*I appologize for my rookie mistake of course they are absolutely correct, it is in the html and that tutorial is for the styling. Of course it shows that it's in the html format I just figured that kind of went without saying. Sorry, I think I misunderstood your question.
__________________

Please login or register to view this content. Registration is FREE
Parents Magazine Cover Contest

Last edited by Gx3 Grafix; 10-02-2007 at 07:30 AM..
Gx3 Grafix is offline
Reply With Quote
View Public Profile Visit Gx3 Grafix's homepage!
 
Old 10-01-2007, 08:16 PM Re: Proper image linking code for CSS
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
You don't put links inside your CSS, you create your links in your HTML like you would any other page. CSS is for STYLING your links.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 10-01-2007, 09:47 PM Re: Proper image linking code for CSS
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
Like LadynRed stated - CSS is for styling.

Just put your an a tag around the img
joder is offline
Reply With Quote
View Public Profile
 
Old 10-02-2007, 03:50 PM Re: Proper image linking code for CSS
Experienced Talker

Posts: 48
Name: Harold
Trades: 0
thanks for the help, everyone!!
Hans G. is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Proper image linking code for CSS
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.65872 seconds with 12 queries