Image Map in Header Area Text Widget Problem

General questions pertaining to how certain issues can be resolved
Forum rules
1. No offensive language and no mocking
2. Please do a thorough search before you post something. Trust us, there is a high probability that the question you are asking has been asked previously.
3. No soliciting. You cannot post here soliciting bids for people offer you quotes, or even offer money to people for some work. You will be moderated if you do so. If you are looking for help, please post your request on http://jobs.wordpress.net or http://codepoet.com
4. Please be reasonable. You are getting software and support. For free. Complicated requests from a general purpose theme are not welcome and some volunteers might lose patience with you.
5. Please do your due diligence. If you posted a query and we answered with a link, take the trouble to go through the link contents.
6. Please post with complete information. Requests for help MUST be accompanied with your URL, particularly if you are asking something like "Why am I seeing a blank space?"

Image Map in Header Area Text Widget Problem

Postby DJinc » 29 Jun 2012, 15:47

Hello,

I've been looking through the threads on how to use an image map in the header area. Basically, I've understood the steps as follows:

1) Place your header as the header background

2) Place a transparent 100x100 .png square as the header foreground

3) Place a text widget in the header widget area

4) Go to http://www.image-maps.com and map out your image

5) Paste the HTML code into the text widget in the header area

I've followed these steps, but when I paste the HTML code into the text widget in the header area it messes up my site.

Here is the code:

Code: Select all
<div style="text-align:center; width:2000px; margin-left:auto; margin-right:auto;">
<img id="Image-Maps_7201206291755334" src="http://images.donjuaninc.com/12-06-26-Header.jpg" usemap="#Image-Maps_7201206291755334" border="0" width="2000" height="170" alt="" />
<map id="_Image-Maps_7201206291755334" name="Image-Maps_7201206291755334">
<area shape="rect" coords="1177,39,1258,61" href="www.donjuaninc.com/free-newsletter-signup" alt="Free newsletter" title="Free newsletter"    />
<area shape="rect" coords="1316,39,1397,61" href="www.donjuaninc.com/modern-mans-guide-to-lifestyle-dating-and-relationships" alt="Modern Mans Guide" title="Modern Mans Guide"    />
<area shape="rect" coords="1455,39,1536,61" href="www.donjuaninc.com/free-consultation" alt="Click Here for Free Session" title="Click Here for Free Session"    />
<area shape="poly" coords="992,156,995,1,319,1,323,168," href="www.donjuaninc.com" alt="Home" title="Home"   />
</map>
</div>


http://www.donjuaninc.com

Before pasting HTML code:

Image

After pasting HTML code:

Image


The code works in terms of making the desired areas clickable, but it makes my header move down and to the left. How can I make the header stay in the same spot but still keep the functionality from the code?

Thanks in advance!
DJinc
 
Posts: 20
Joined: 25 Dec 2010, 05:57

Re: Image Map in Header Area Text Widget Problem

Postby Colin » 29 Jun 2012, 22:50

Is your image really 2000px wide? I doubt it. I suspect that this is what is causing your issue.
Colin
 
Posts: 2800
Joined: 27 Oct 2009, 10:46

Re: Image Map in Header Area Text Widget Problem

Postby DJinc » 29 Jun 2012, 23:45

Yes - 2000 px wide by 170 px high. I had it set to 1440 px but it looked bad on desktop monitors displaying higher resolutions. At 2000 px the white of the header extends from edge to edge on all but the highest of resolutions.

You think reducing it to 1440 px and remapping would solve the issue?

In the code, I played around with the width a bit. At 1665 px the image is almost centered again, but that big gap still exists between the top nav bar and the header.

EDIT: Here is the part of code I was messing around with

Code: Select all
<div style="text-align:center; width:2000px; margin-left:auto; margin-right:auto;">
DJinc
 
Posts: 20
Joined: 25 Dec 2010, 05:57

Re: Image Map in Header Area Text Widget Problem

Postby drake » 30 Jun 2012, 00:07

You don't need that 100x100px png. It was tailored for the site for which I give that solution and for the version of theme in use at that time.

If you wish that your logo to be clickabile, can map a link to the homepage over the name of the site in the image map. So, use your image as it, at 2000px, but don't use in foreground of the site that png and set Blog Title / Header Image to be hidden at Suffusion Option -> Other Graphical Element -> Header.

Let the widget in place, even it still look bad, we can help you to align it by CSS if we have something to align...
drake
 
Posts: 3805
Joined: 26 Jul 2011, 07:56
Location: Constanta, Romania

Re: Image Map in Header Area Text Widget Problem

Postby DJinc » 30 Jun 2012, 23:04

drake wrote:You don't need that 100x100px png. It was tailored for the site for which I give that solution and for the version of theme in use at that time.

If you wish that your logo to be clickabile, can map a link to the homepage over the name of the site in the image map. So, use your image as it, at 2000px, but don't use in foreground of the site that png and set Blog Title / Header Image to be hidden at Suffusion Option -> Other Graphical Element -> Header.

Let the widget in place, even it still look bad, we can help you to align it by CSS if we have something to align...


I went to foreground image and changed it to text. Then went to Suffusion Option -> Other Graphical Element -> Header and changed the Blog Title / Header image to hidden. Made sure description and subheader alignment is hidden. Also under skinning turned blog title / header hover decoration to hidden.

I tried repasting the code after I did this, and it still does the exact same thing as in the second photo. Any ideas?
DJinc
 
Posts: 20
Joined: 25 Dec 2010, 05:57

Re: Image Map in Header Area Text Widget Problem

Postby drake » 30 Jun 2012, 23:41

If you don't respect the last line of my post, I can't have any idea and I can't help you, just because I don't have nothing to align.
drake
 
Posts: 3805
Joined: 26 Jul 2011, 07:56
Location: Constanta, Romania

Re: Image Map in Header Area Text Widget Problem

Postby DJinc » 12 Jul 2012, 15:37

Sorry Drake, I didn't understand what you meant at first. You wanted me to leave it misaligned so you can view the code while it's in that state.

Interestingly, without any code pasted into the text widget in the header, it still has issues. I think this means it might be the text widget itself. See what I mean:

Image

The grey line between the header and the top navbar gets thicker, and a grey line appears at the bottom.

I have pasted the code back in and left it misaligned so you can see the code and tell me if there's a way to fix it. Thank you again for all of your help.

-Ryan
DJinc
 
Posts: 20
Joined: 25 Dec 2010, 05:57

Re: Image Map in Header Area Text Widget Problem

Postby drake » 12 Jul 2012, 20:06

Add at Suffusion Options -> Backend -> Custom Includes -> Custom Styles:
Code: Select all
#header {display:none;}
#header-widgets {float:left;margin-left:-323px;}


If you crop your image right before the picture from the left side you don't need to define that negative margin, by floating left your widget will came aligned at the left of screen.
You can make the image exactly at the width of header, then use the background of header-widgets for taking all the space of any screen. In my above definition for #header-widgets you need to add width:100%;
drake
 
Posts: 3805
Joined: 26 Jul 2011, 07:56
Location: Constanta, Romania

Re: Image Map in Header Area Text Widget Problem

Postby DJinc » 13 Jul 2012, 15:26

You're the man Drake. Thanks for all your help, my site looks great now.
DJinc
 
Posts: 20
Joined: 25 Dec 2010, 05:57


Return to Support Requests

Who is online

Users browsing this forum: AliishaSmissosse, Exabot [Bot] and 4 guests