HTML help

Matt-LivUniSkydivers

Inactive User
Joined
Oct 25, 2006
Messages
364
Reaction score
2
Hi there,

I was wondering if anyone could help me with some coding problems I've got. All I'm looking for is to make a small banner consisting of a background image which can be clicked and have alt text assigned to it, and an additional 2 text links sat on top of the image.

I have attached 2 examples of code I've tried using so you can see what I'm trying to achieve, but each has different problems.

Banner 1 is my most recent attempt, and this works fine most of the time, but on some website the image fails to appear no matter what I try... thus rendering the whole thing useless! Also the image is supposed to be clickable, but for some reason the regions either side of the image are also clickable!

Banner 2 is my old design, and this worked fairly well except ideally I'd like the background image clickable aswell, and with "alt" text such as "test.com"

If someone could tell me what I'm doing wrong it would be legendary, as this has been doing my nut in for over a week! :Cry:

(I think my attempts may be over complicated, the simpler the code the better really!)
 
Thanks for taking a look pob :) I'm basically going to be sending this code to a few website owners to advertise my dads photography website that he's trying to get started with, so I guess I would need to ask them to put the some of the code in the <head> and some in the <body>? Is there any way around this?
 
Sorry, one further question...

If I'm starting my code with <div id="MCBanner" , then does one assume that there needs to be a corresponding div#MCBanner{ } within the <head>?

I think this might be a huge oversight on my part, and therefore something which you addressed in your reply. Is this right?
 
All I've done was move the CSS decelerations to the <head> out of personal preference. Feel free to move them back to the body. (If they are to be called on by numerous pages I'd actually make a separate .css file which can be called upon across the site.)

So:
PHP:
You don't have permission to view the code content. Log in or register now.
Would become:
PHP:
You don't have permission to view the code content. Log in or register now.

As far as I know there is no need to declare the id attributes in the <div> and <span> tags in the CSS if it doesn't call on the CSS. (But I am self-taught rather than had any official training.)
 
Back
Top