Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > HTML, XHTML and CSS

Reply
 
LinkBack Thread Tools
Old November 3rd, 2006, 09:03 PM   #1
Elite Veteran
 

Join Date: Sep 2006
Location: Pink House
Posts: 3,941
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all
Can you Link areas of a background image

Ok here goes my first of what I know will be many questions. I've officially embarking on my first complete css design (taking a bow).
My question is
In the old days (yesterday) you had an image in a table. You could link to a certain area using a hotspot. For instance if you have an email address on a graphic, you could link the email address with the hotspot. Nice since sometimes I want to use a fancy font in my design.
Is this possible in CSS?

Here's my code;
#topheader {
background: url(images/final_design_1.jpg) no-repeat scroll left top;
width: 775px;
height: 199px;
position: left;
margin: 0;

If it's not possible, is there another way around this?
Thanks in advance,
Linda
Lchad is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 4th, 2006, 12:40 PM   #2
Most Reputable Member
 

Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,307
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 ukgeoff has a spectacular aura about ukgeoff has a spectacular aura about
Re: Can you Link areas of a background image

Strange, I have replied to this once but it seems to have gone missing.

By hotspot, I assume you are talking about using image maps?

Whether you still choose to use them or not is nothing to do with css.

What you could do with css instead of having the link as part of your graphic is to have you graphic image, say as the background of a div, and within that div have a normal text link but position it where ever you like above that graphic.

It would also be a more accessibility friendly solution.
ukgeoff is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 4th, 2006, 04:16 PM   #3
Elite Veteran
 

Join Date: Sep 2006
Location: Pink House
Posts: 3,941
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all
Re: Can you Link areas of a background image

Yes I meant image maps. Sure I understand that which is probably what I'd do in most cases. However for this particular project we are using a script font that the browsers can't read.

What i ended up doing is putting in a transparent spacer gif. I've moved it over the email address and linked the spacer gif.

I'm struggling with moving it over to the far right of the background... but that's just the learning curve of css. Like I said, I'm at kindergarten level!
I think it took me 8 hours yesterday to do something that would have taken less than 20 minutes in tables. Not too profitable however, I did like the looks of the code! Three div's for the entire page.

Thanks for responding!
Linda
Lchad is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 4th, 2006, 04:35 PM   #4
Most Reputable Member
 

Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,307
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 ukgeoff has a spectacular aura about ukgeoff has a spectacular aura about
Re: Can you Link areas of a background image

Can you put the page somewhere I can see it and look at the code then I will be able to guide you better?
ukgeoff is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 4th, 2006, 06:46 PM   #5
Elite Veteran
 

Join Date: Aug 2005
Location: That Place
Posts: 2,081
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
Rep Altering Power: 0 moojoo will become famous soon enough moojoo will become famous soon enough
Re: Can you Link areas of a background image

You can do it with positioned divs displayed as a block etc etc...
__________________

moojoo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 4th, 2006, 07:07 PM   #6
Elite Veteran
 

Join Date: Sep 2006
Location: Pink House
Posts: 3,941
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all
Re: Can you Link areas of a background image

Ok.. I guess I'm ready for you to see my "first" css creation. http://www.apride.us/final.html

I took out the spacer image because it was really messing up things.

Moojoo..thanks but since I'm in css kindergarden, that was way over my head!

So now the object here is to somehow make the email address in the topheader background image, a usable link!
Lchad is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 6th, 2006, 07:44 AM   #7
Reputable Member
 

Join Date: May 2006
Location: Warrington, UK
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Accurax is on a distinguished road
Re: Can you Link areas of a background image

Just use text

Use <p> tags for the phone numbers etc and just style:

#divheader p

untill you get the text to display wherever you want it.
Accurax is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 6th, 2006, 08:10 AM   #8
Elite Veteran
 

Join Date: Sep 2006
Location: Pink House
Posts: 3,941
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all
Re: Can you Link areas of a background image

Thanks but I'm not going to use just "text". I want to use a fancy script font which will not work unless it is a graphic.
Lchad is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 6th, 2006, 09:22 AM   #9
Most Reputable Member
 

Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,307
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 ukgeoff has a spectacular aura about ukgeoff has a spectacular aura about
Re: Can you Link areas of a background image

Ok. Had a look at the site.

Which is the fancy font you want to be a link?
ukgeoff is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 6th, 2006, 09:49 AM   #10
Elite Veteran
 

Join Date: Sep 2006
Location: Pink House
Posts: 3,941
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all
Re: Can you Link areas of a background image

The email address in the header!
Lchad is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 6th, 2006, 10:49 AM   #11
Elite Veteran
 

Join Date: Aug 2005
Location: That Place
Posts: 2,081
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
Rep Altering Power: 0 moojoo will become famous soon enough moojoo will become famous soon enough
Re: Can you Link areas of a background image

CSS would be better than image maps and slicing imo. Think of it like this:

#topheader {
background: url(images/final_design_1.jpg) no-repeat scroll left top;
width: 775px;
height: 199px;
position: left;
margin: 0;

So you have a box 775px wide by 199px tall. Say for example the e-mail was in the top left and was 200px by 25px. This is just quick and dirty but should work.

#topheader a {
width:200px;
height:25px;
display:block;
text-decoration:none;
}

then in your html you would do something like:

<div id="topheader">
<div id="emaillink">
<a href="">&nbsp;</a>
</div>
<!-- end email link -->
</div>
<!-- end top header -->

Hope that at least clears up what I was suggesting. Attached is a functional example.
Attached Files
File Type: zip slice_example.zip (467 Bytes, 35 views)
__________________


Last edited by moojoo; November 6th, 2006 at 10:55 AM..
moojoo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 6th, 2006, 11:22 AM   #12
Elite Veteran
 

Join Date: Sep 2006
Location: Pink House
Posts: 3,941
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all
Re: Can you Link areas of a background image

Thank you for your time and effort moojoo. It's very much appreciated.
However I will not be changing the design since this is client approved. So putting the email address in the upper left corner isn't an option at this time.
Thanks again! However, I will look at your suggestion and see if I can't put the display block over my email address.
Lchad is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 6th, 2006, 11:27 AM   #13
Elite Veteran
 

Join Date: Aug 2005
Location: That Place
Posts: 2,081
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
Rep Altering Power: 0 moojoo will become famous soon enough moojoo will become famous soon enough
Re: Can you Link areas of a background image

That was just an example damnit.. use it to work it the way you need silly.
__________________

moojoo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 6th, 2006, 11:32 AM   #14
Elite Veteran
 

Join Date: Sep 2006
Location: Pink House
Posts: 3,941
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all
Re: Can you Link areas of a background image

derrrrrrrrrrr...ok... I'm slow!
Lchad is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 6th, 2006, 11:41 AM   #15
Most Reputable Member
 

Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,307
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 ukgeoff has a spectacular aura about ukgeoff has a spectacular aura about
Re: Can you Link areas of a background image

Why don't you seperate the email address out into its own image.

You could then place that image inside a link element and use css to position them where the current image address is?
ukgeoff is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 6th, 2006, 12:02 PM   #16
Elite Veteran
 

Join Date: Aug 2005
Location: That Place
Posts: 2,081
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
Rep Altering Power: 0 moojoo will become famous soon enough moojoo will become famous soon enough
Re: Can you Link areas of a background image

that works too. the example I gave him could be used for either. Just add a background: property to it.
__________________

moojoo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 6th, 2006, 12:10 PM   #17
Elite Veteran
 

Join Date: Sep 2006
Location: Pink House
Posts: 3,941
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all
Re: Can you Link areas of a background image

That's an excellent idea Geoff! I think that would be easier for me...
Thanks so much guys!
Lchad is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 22nd, 2006, 10:06 PM   #18
New Member
 

Join Date: Nov 2006
Location: massillon, ohio
Age: 30
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 fairydreamz23 is on a distinguished road
Re: Can you Link areas of a background image

I know what you're trying to do, and while I'm new at this, I have the solution. I've been using this method to create custom myspaces for people. I did my own lusing this method, you can view here . With those, I basically make the entire layout as a graphic, then make "invisible links" inside the main div. This is how it works.

.email { width: ?px; height: ?px; z-index: 1; left: ?px; top: ?px }
.name {
position: relative;
width: ?px;
height: ?px;
}
.name a {
text-decoration: none;
border: none;
display: block;
position: absolute;
text-indent: -5000px;
}

Then you would put this inside your main div and specify the location of the link
like this

<div class="main">
<div class="name">
<a href="URL" class="email" />email</a>
</div>

I use Photoshop to find the top and left values with the info tab and a basic size i want the link to be.

I hope that helps. It took me forever to figure out.
fairydreamz23 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
background image , link


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fix background image in IE6 tenderfoot HTML, XHTML and CSS 1 January 30th, 2008 07:02 AM
CSS Background Image as a Link? TheLion HTML, XHTML and CSS 4 January 18th, 2008 07:28 AM
Background image overlaping footer image at bottom of div lw_d HTML, XHTML and CSS 4 March 20th, 2006 08:27 PM
Background Image jwalker80 HTML, XHTML and CSS 2 December 22nd, 2005 10:52 AM
Password/Members Only areas sgara HTML, XHTML and CSS 19 July 2nd, 2004 03:23 PM


Search Engine Optimization by vBSEO 3.2.0 RC8