Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Topic started by: Chalky on June 16, 2013, 08:24:13 AM

Title: How to make an image clickable after I've rammed it into my navbar?
Post by: Chalky on June 16, 2013, 08:24:13 AM
As you know I've barely a clue about coding.  It seems a simple enough task: I don't want to use my Twitter button anymore because it dumps cookies on my visitor's computers that I can't suppress, so I want to replace it with a simple image that links to my Twitter profile.

Here you can see the Twitter button I want to replace, though it's positioned and working perfectly http://chalkcat.com/index.php

First I tried simply replacing the Twitter button code between the <div style="float: right; margin: 6px 22px 0 0;"></div> which I had created for my working Twitter button with basic html:


<div style="float: right; margin: 6px 22px 0 0;"><a href="https://twitter.com/ChalkCat"><img src="http://chalkcat.com/Themes/Actualism/images/Twitter.png" alt="Twitter" /></a>
</div>


This gave me the image in the right place but it wasn't clickable, so I did some googling and the problem appears to be that the image is being treated as a background image and therefore not clickable.  After some more googling, copying and pasting, I changed the code to this:

<div style="float: right; margin: 6px 22px 0 0;"><a class="twitter" title="twitter" href="https://twitter.com/#!/ChalkCat" style="float: right; margin: 6px 22px 0 0;background: transparent url(http://chalkcat.com/Themes/Actualism/images/Twitter.png) no-repeat top right;height:32px;width:32px;" target="_blank" rel="nofollow me">
</div>


but the result is the same, as you can see on my test site here http://parsleymonster.net/smf/index.php

Other than trying to be lazy with inline CSS rather than defining the class in index.css, I can't see what I'm doing wrong.  Please can one of you clever people show me the way?  :)
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Mick. on June 16, 2013, 08:38:55 AM
The first code works fine. My guess is the #toolbar in the css is acting up.

Just for giggles, let make something like this in the css? Add it above the #toolbar


#toolbar img a {
       cursor: pointer;
}
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Chalky on June 16, 2013, 08:50:25 AM
Thanks Mick, I've just done that and I've put that first lot of code back in index.template.php, but still no bananas  :(  I still have a pretty Twitter icon that I can't click on.  http://parsleymonster.net/smf/index.php
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Mick. on June 16, 2013, 08:51:02 AM
After some thought, thats not going to work :P  Let do this....


In the CSS file

.twitter-icon a {
      float: right;
      margin: 6px 22px 0 0;
      background: url (../images/Twitter.png) no-repeat;
}



In index.template.php
<div class="twitter-icon">
      <a href="https://twitter.com/ChalkCat" title="Follow Me"></a>
        </div>
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Chalky on June 16, 2013, 08:58:32 AM
Now the image has disappeared altogether  :P
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Mick. on June 16, 2013, 09:01:19 AM
Quote from: ChalkCat on June 16, 2013, 08:58:32 AM
Now the image has disappeared altogether  :P
lol,  it may be because i dont know where the image resides...


Let do this...


.twitter-icon a {
      float: right;
      margin: 6px 22px 0 0;
      background: url ("http://chalkcat.com/Themes/Actualism/images/Twitter.png") no-repeat;
}
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Chalky on June 16, 2013, 09:15:44 AM
Something weird is going on, no wonder I couldn't do this on my own  O:)  Still no sign of the image.  I am working with my test site at the moment which is parsleymonster.net/smf so I have to be careful I don't get muddled, but I have adjusted the image url to account for that and the image is at the place I'm pointing it to:

.twitter-icon a {
      float: right;
      margin: 6px 22px 0 0;
      background: url ("http://parsleymonster.net/smf/Themes/Actualism/images/Twitter.png") no-repeat;
}
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Mick. on June 16, 2013, 09:17:14 AM
Ok the image may be hidden behind the toolbar. Let's bring it up front with a z-index.

.twitter-icon a {
      float: right;
      margin: 6px 22px 0 0;
      background-image: url("http://parsleymonster.net/smf/Themes/Actualism/images/Twitter.png") no-repeat;
      z-index: 100;
}
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Mick. on June 16, 2013, 09:27:35 AM
Try this. I modified a bit.

.twitter-icon a {
      float: right;
      display: block;
      margin: 6px 22px 0 0;
      background-image: url("http://parsleymonster.net/smf/Themes/Actualism/images/Twitter.png") no-repeat;
      z-index: 1000;
}
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Chalky on June 16, 2013, 09:37:03 AM
Thanks for your patience.  I've added the display:block and even tried the z-index at 999, still no little image to be seen.  I've checked and double checked what I'm doing every step of the way because I'm the queen of stupid mistakes, but I don't seem to be doing anything wrong  :-\  I'm wondering whether I rammed the div in the wrong place to start with, but it's in exactly the same place where my Twitter button has been working all this time.  I don't know whether it helps to see my index.template.php....
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Mick. on June 16, 2013, 09:40:54 AM
I looked at the source of the forum and it seemed odd to see the twitter code "outside" of the #toolbar.

What if you move the
<div class="twitter-icon">
      <a href="https://twitter.com/ChalkCat" title="Follow Me"></a>
        </div>


Under the <div id="toolbar"> ?

Like this:

<div id="toolbar">

<div class="twitter-icon">
      <a href="https://twitter.com/ChalkCat" title="Follow Me"></a>
        </div>
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Chalky on June 16, 2013, 09:46:39 AM
Ok, just done that, sorry, no change....  :(
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Mick. on June 16, 2013, 09:54:46 AM
This should work now,.... it needed the image sizes  :P

.twitter-icon a {
      float: right;
      margin: 6px 22px 0 0;
      height: 32px;
      width: 32px;
      display: block;
      background: url("http://parsleymonster.net/smf/Themes/Actualism/images/Twitter.png") no-repeat;
      z-index: 999;
}
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Chalky on June 16, 2013, 10:00:56 AM
Yay, the image has returned!!!   :D

It still isn't clickable though  (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fchalkcat.com%2FSmileys%2Ffantasticsmileys%2Fpeek2.gif&hash=4b01a8bc35e94260326d64f27349b80da1e42174)
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Mick. on June 16, 2013, 10:05:03 AM
Any reason why you have 2 #toolbars in your css?

#toolbar {
margin-top: 0;
padding: 0;
height: 40px;
background: #0a0a0a url(../images/art/navbg.png);
}

#toolbar {
margin-top: 0;
padding: 0;
height: 40px;
background: #0a0a0a url(../images/art/ACnavbg.png);
}
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Mick. on June 16, 2013, 10:08:02 AM
It works fine on my test page. I think theres something screwy with the meny bar.

http://idesign360.com/community/index.php/page,page2354.html
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Chalky on June 16, 2013, 10:19:14 AM
Quote from: Mick. on June 16, 2013, 10:05:03 AM
Any reason why you have 2 #toolbars in your css?

#toolbar {
margin-top: 0;
padding: 0;
height: 40px;
background: #0a0a0a url(../images/art/navbg.png);
}

#toolbar {
margin-top: 0;
padding: 0;
height: 40px;
background: #0a0a0a url(../images/art/ACnavbg.png);
}


I have no idea.  I've just downloaded the theme afresh to compare clean files and they're there as well.  It came with two  :-\

It is looking like there's something skewy with my menu, I knew it shouldn't be this difficult.
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Mick. on June 16, 2013, 10:23:03 AM
Leave it be then.


Quite frankly, im stumped.  :-[
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Mick. on June 16, 2013, 10:26:12 AM
Another way to test to see if the menu is the culprit is moving the icon above the menu. It will sit below the search bar.


add:
<div class="twitter-icon">
      <a href="https://twitter.com/ChalkCat" title="Follow Me"></a>
        </div>


Before:
<div id="logo">
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: ARG01 on June 16, 2013, 10:28:49 AM
The ACnavbg.png image does not exists. I think this may have been an error during design. Try removing this from index.css as it may be canceling out the other.

#toolbar {
margin-top: 0;
padding: 0;
height: 40px;
background: #0a0a0a url(../images/art/ACnavbg.png);
}


There is really no reason to have two mentions of "#toolbar"
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Mick. on June 16, 2013, 10:32:27 AM
I now see the icon is clickable.   Now we know the menu is the culprit. My guess you also use menu mods?
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Chalky on June 16, 2013, 10:32:44 AM
I just moved the code to above <div id="logo"> and um... I don't think it landed where you expected it to  ;)

I will try removing the duplicate instance of toolbar now...

Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Mick. on June 16, 2013, 10:33:41 AM
Quote from: ChalkCat on June 16, 2013, 10:32:44 AM
I just moved the code to above <div id="logo"> and um... I don't think it landed where you expected it to  ;)

I will try removing the duplicate instance of toolbar now...


Right, but it was for testing purposes.
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Chalky on June 16, 2013, 10:34:19 AM
Quote from: Mick. on June 16, 2013, 10:32:27 AM
I now see the icon is clickable.   Now we know the menu is the culprit. My guess you also use menu mods?

It's clickable but it's picking up the destination from the site logo, not the Twitter link.  No, I have no menu mods, I have done everything menu-related manually in Subs.php.
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Mick. on June 16, 2013, 10:36:09 AM
Quote from: ChalkCat on June 16, 2013, 10:34:19 AM
Quote from: Mick. on June 16, 2013, 10:32:27 AM
I now see the icon is clickable.   Now we know the menu is the culprit. My guess you also use menu mods?

It's clickable but it's picking up the destination from the site logo, not the Twitter link.  No, I have no menu mods, I have done everything menu-related manually in Subs.php.
Its clickable if hovered to the far right. Anywho, thats not where we wanted. We moved it there for testing purposes.
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Chalky on June 16, 2013, 10:40:54 AM
Quote from: Mick. on June 16, 2013, 10:36:09 AM
Its clickable if hovered to the far right. Anywho, thats not where we wanted. We moved it there for testing purposes.

Gotcha and understood.  I've now removed it and also removed the duplicate #toolbar entry from the CSS as ARG suggested.  What can I try now?  :P  I've dropped a post too on the Actualism support thread with a link here in case Crip can shed any light on the matter.
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Mick. on June 16, 2013, 10:43:11 AM
This is the code in use... ;)   Maybe Crip can also update his theme.


.twitter-icon a {
      float: right;
      margin: 6px 22px 0 0;
      height: 32px;
      width: 32px;
      display: block;
      background: url("http://parsleymonster.net/smf/Themes/Actualism/images/Twitter.png") no-repeat;
      z-index: 999;
}



<div class="twitter-icon">
      <a href="https://twitter.com/ChalkCat" title="Follow Me"></a>
</div>


Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Crip on June 16, 2013, 11:44:25 AM
What does the menu do when :hovered ?

Go to: >index.template.php mnu section..>


<div id="topnav">
<ul>


Make like::


<ul id="topnav">';


Remove it's closing </ div>
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Crip on June 16, 2013, 12:09:27 PM
Quote from: ARG on June 16, 2013, 10:28:49 AM
The ACnavbg.png image does not exists. I think this may have been an error during design. Try removing this from index.css as it may be canceling out the other.

#toolbar {
margin-top: 0;
padding: 0;
height: 40px;
background: #0a0a0a url(../images/art/ACnavbg.png);
}


There is really no reason to have two mentions of "#toolbar"

here it is bro'
http://chalkcat.com/Themes/Actualism/images/art/Acnavbg.png
---
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Chalky on June 16, 2013, 12:15:56 PM
Hi Crip, thanks for looking in   :)

I'm sorry, I'm not sure I fully understand.  I made the edit as I understand it so that I now have this:

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;

echo '
<ul id="topnav">';

foreach ($context['menu_buttons'] as $act => $button)
{
echo '
<li id="button_', $act, '">
<a class="', $button['active_button'] ? 'active ' : '', '" href="', $button['href'], '"', isset($button['target']) ? ' target="' . $button['target'] . '"' : '', '>', $button['title'], '</a>';

if (!empty($button['sub_buttons']))
{
echo '
<ul>';

foreach ($button['sub_buttons'] as $childbutton)
{
echo '
<li>
<a href="', $childbutton['href'], '"', isset($childbutton['target']) ? ' target="' . $childbutton['target'] . '"' : '', '>', $childbutton['title'], !empty($childbutton['sub_buttons']) ? '...' : '', '</a>';

// 3rd level menus :)
if (!empty($childbutton['sub_buttons']))
{
echo '
<ul>';

foreach ($childbutton['sub_buttons'] as $grandchildbutton)
echo '
<li>
<a href="', $grandchildbutton['href'], '"', isset($grandchildbutton['target']) ? ' target="' . $grandchildbutton['target'] . '"' : '', '>', $grandchildbutton['title'], '</a>
</li>';

echo '
</ul>';
}

echo '
</li>';
}
echo '
</ul>';
}
echo '
</li>';
}

echo '
</ul>';
}


but now the background is broken as you can see here http://parsleymonster.net/smf/index.php

Not sure either what you mean "What does the menu do when :hovered ?"- it has always appeared to work just fine, you can see it before any of today's tampering on my live site http://chalkcat.com/index.php
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Crip on June 16, 2013, 12:18:04 PM
.....if i was Admin i may can fix it...?

...or it may need updated ... i will check it?
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Chalky on June 16, 2013, 12:21:59 PM
Sure, sending you a PM  :)
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: ARG01 on June 16, 2013, 12:25:54 PM
Quote from: Crip on June 16, 2013, 12:09:27 PM
Quote from: ARG on June 16, 2013, 10:28:49 AM
The ACnavbg.png image does not exists. I think this may have been an error during design. Try removing this from index.css as it may be canceling out the other.

#toolbar {
margin-top: 0;
padding: 0;
height: 40px;
background: #0a0a0a url(../images/art/ACnavbg.png);
}


There is really no reason to have two mentions of "#toolbar"

here it is bro'
http://chalkcat.com/Themes/Actualism/images/art/Acnavbg.png
---

Sorry. I was getting an error stating that the image did not exist. In any case, one of the toolbar mentions should be renamed so there is not two "#toolbar" attributes.  ;)
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Crip on June 16, 2013, 12:28:57 PM
true , leftovers ya know , but the menu_drop works fine with me? ;)

That twitter con could be placed anywhere actually.
     Like in-line with the linktree(); (a place holder) & float: right; ====> seems logical  ?

sorry, i've never messed with social icons .. so i'm of no help here looks like?
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Crip on June 16, 2013, 03:39:26 PM
Quote from: ChalkCat on June 16, 2013, 12:21:59 PM
Sure, sending you a PM  :)

JUST UPDATED 2.0.4 VERSION ...    might help ya?
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: NanoSector on June 16, 2013, 03:52:59 PM
...

/me loves hackz

'twitter' => array(
'title' => '<div class="floatright"><img src="http://path.to/image.png" alt="" /></div>',
'href' => 'http://link.here',
'show' => true,
),

et voilla :P
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Mick. on June 16, 2013, 04:10:55 PM
Quote from: Yoshi on June 16, 2013, 03:52:59 PM
...

/me loves hackz

'twitter' => array(
'title' => '<div class="floatright"><img src="http://path.to/image.png" alt="" /></div>',
'href' => 'http://link.here',
'show' => true,
),

et voilla :P



OOOOOOOOooooooooo!!!!!!!  I like this Yo!
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: NanoSector on June 16, 2013, 04:29:58 PM
Lol. I don't see why you are all doodling around with HTML and CSS so much, while this even makes it work in other themes :P
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Chalky on June 16, 2013, 04:59:46 PM
Thanks Yoshi  :)  That's given me this http://parsleymonster.net/smf/index.php which is very close!  Can I get it any further to the right?

Thanks Crip too, my forum is so heavily modded that I will have to update the theme manually, so that's a job for another day in the week...
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Mick. on June 16, 2013, 05:02:25 PM
Quote from: ChalkCat on June 16, 2013, 04:59:46 PM
Thanks Yoshi  :)  That's given me this http://parsleymonster.net/smf/index.php which is very close!  Can I get it any further to the right?

Thanks Crip too, my forum is so heavily modded that I will have to update the theme manually, so that's a job for another day in the week...

Because its in the nav-bar and not the toolbar ;)

The toolbar is the placeholder for the navigation.
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Chalky on June 16, 2013, 05:07:52 PM
So where do I put it then?  Sorry, I'm only a wannabe hack and not a very good one  O:)
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: ARG01 on June 16, 2013, 11:20:55 PM
Okay, I have been gone all day and this is still going? That's it! In the next day or two I will post a detailed tut on how to add social icons/clickable images to any theme.  ;)
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Crip on June 17, 2013, 07:07:13 AM
ChalkCat ,

I was looking at this: you could add that button/icon + most anywhere besides the Menu....?

   I'm talking Header?/Footer/Above Header with a single #twitter Div>> in the .css..at-leasettt it would wok ..?
• Only a suggestion friend. :)

Like::??:::
even above Search?
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: ARG01 on June 17, 2013, 10:34:40 AM
Yes, it is actually a bit easier to place optional images anywhere besides the toolbar. For some reason it takes more work to add them to the toolbar. Putting things in a wrapper also helps.
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Crip on June 17, 2013, 10:49:40 AM
totally correct Mister ARG ;)  Lol..
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Crip on June 21, 2013, 01:59:22 PM
i got it peeps via <span>  tags  </span>
......and it do CLICK
------------------------------------------ ;D
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Chalky on June 21, 2013, 02:32:08 PM
Oh wow, oh wow, oh wow!  That's what I want!  Thanks Crip  :D  Do those span tags replace the div tags I've been using until now?
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Crip on June 21, 2013, 03:00:34 PM
i removed the <div s and just added <span>  </span>
---------- with FB ..
PM sent

Update:
via FB i removed the <li class="button_twitter"></li>
----
and put:;
<span><a href="http://Twitter.com/ChalkCat" class=""><div class="floatright"><img alt="" src="http://parsleymonster.net/smf/Themes/Actualism/images/Twitter.png"></div></a>
</span>
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Crip on June 22, 2013, 04:58:26 PM
Quote from: ChalkCat on June 21, 2013, 02:32:08 PM
Oh wow, oh wow, oh wow!  That's what I want!  Thanks Crip  :D  Do those span tags replace the div tags I've been using until now?

Forget <span tags >
See:
http://www.jpr62.com/demos/index.php?theme=10
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: TheListener on June 22, 2013, 05:04:21 PM
Quote from: ChalkCat on June 21, 2013, 02:32:08 PM
Oh wow, oh wow, oh wow!

Calm down dear it's only a forum.

:D
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: ARG01 on June 22, 2013, 05:19:00 PM
Quote from: Old Fossil on June 22, 2013, 05:04:21 PM
Quote from: ChalkCat on June 21, 2013, 02:32:08 PM
Oh wow, oh wow, oh wow!

Calm down dear it's only a forum.

:D

Sometimes excitement gets the best of us.  :D
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Chalky on June 23, 2013, 05:29:14 AM
Right, so copying from Crip's demo site best I can using Firebug, I now have this:

Code (index.template.php) Select
<div id="topnav">
<div id="link2"><ul><li><a class="twitter" target="_blank" title="Follow ChalkCat on Twitter" href="http://www.twitter.com/ChalkCat"></a></li></ul></div>
<ul>';


Code (css) Select
#link2 {
    float: right;
    padding: 5px 10px 0px;
}
a.twitter:hover {
      float: right;
      height: 32px;
      width: 32px;
      background: url("../images/Twitter.png") no-repeat scroll 0% 0% transparent;
}


but nothing is showing up.  I know it's because I'm thick but what have I done wrong???
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: French on June 23, 2013, 05:46:21 AM
Quote from: ChalkCat
but nothing is showing up.  I know it's because I'm thick but what have I done wrong???
No you didn't
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Chalky on June 23, 2013, 06:03:50 AM
Thanks French but that's the wrong site  ;)  I made do with shoving a button in the linktree on ChalkCat yesterday which is what you can see, but I'm still trying to put it in the navbar.  The site I'm working with is http://parsleymonster.net/smf - not showing there  :)
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Chalky on June 23, 2013, 06:30:38 AM
Ok, we have progress!!!   I changed it from a.twitter:hover { to a.twitter { and now it's showing and clickable - w00t!

Problem now is that when you roll the mouse over it it's been treated like a navbar button and highlights obscuring the twitter button.  Any ideas how I fix this?
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: kat on June 23, 2013, 06:44:59 AM
<img alt=

???

(Pure guess) ;)
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: NanoSector on June 23, 2013, 06:50:05 AM
Quote from: K@ on June 23, 2013, 06:44:59 AM
<img alt=

???

(Pure guess) ;)
The alt parameter is for when the image could not be found, it displays the text in the alt. :)
If you're certain the image exists you can put alt="" in to comply with the XHTML standard.

But, in this case, it won't affect the displaying of the button.
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Chalky on June 23, 2013, 06:52:30 AM
Thanks K@ just tried it in the index.template.php but no bananas, though the image is specified in the css...  I don't know how to put it there though.  My css now looks like this:

/*Twitter button*/
#link2 {
    float: right;
    padding: 5px 10px 0px;
}
#link2 li a {
    display: inline-block;
    padding-right: 10px;
}
#link2 li {
    float: left;
    list-style: none outside none;
    padding: 0;
}
a.twitter {
      float: right;
      height: 32px;
      width: 32px;
      background: url("http://parsleymonster.net/smf/Themes/Actualism/images/Twitter.png") no-repeat scroll 0% 0% transparent;
}


Ah cheers Yoshi.  All I can see is that on Crip's site, hovering over the thing doesn't change the css it's using, but on mine it skips to the topnav hover stuff as soon as my mouse goes near it.  I don't know how much more beating from my head this table can stand...
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Chalky on June 23, 2013, 07:24:40 AM
Got there!!!!!!!  Huge thank you to Crip!!!  I needed to include both a.twitter and a.twitter:hover, and now it's perfect!  I just need to finalise my choice of button now  (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fchalkcat.com%2FSmileys%2Ffantasticsmileys%2FWoot_Emoticon.gif&hash=bb7da92c95572a7c6cafb8c430cfa17f76887eb4)
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: kat on June 23, 2013, 07:31:19 AM
I was close.

Cosmically speaking, anyway! :P

Well sorted, your royal Chalkiness! :)
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Crip on June 23, 2013, 10:37:35 AM
..it looks really good.
Title: Re: How to make an image clickable after I've rammed it into my navbar?
Post by: Chalky on June 23, 2013, 10:49:08 AM
 (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fchalkcat.com%2FSmileys%2Ffantasticsmileys%2FThanx.gif&hash=d0c387dc94040edc67fae980008da78fd1462e6c)