News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

How to make an image clickable after I've rammed it into my navbar?

Started by Chalky, June 16, 2013, 08:24:13 AM

Previous topic - Next topic

Mick.

I now see the icon is clickable.   Now we know the menu is the culprit. My guess you also use menu mods?

Chalky

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...


Mick.

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.

Chalky

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.

Mick.

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.

Chalky

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.

Mick.

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>



Crip

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>
I have become comfortably numb!


I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -



TOTM Winner. | Demo Site1on1 Theme Support

Crip

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
---
I have become comfortably numb!


I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -



TOTM Winner. | Demo Site1on1 Theme Support

Chalky

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

Crip

.....if i was Admin i may can fix it...?

...or it may need updated ... i will check it?
I have become comfortably numb!


I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -



TOTM Winner. | Demo Site1on1 Theme Support

Chalky


ARG01

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.  ;)
No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

Crip

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?
I have become comfortably numb!


I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -



TOTM Winner. | Demo Site1on1 Theme Support

Crip

I have become comfortably numb!


I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -



TOTM Winner. | Demo Site1on1 Theme Support

NanoSector

...

* Yoshi 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
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Mick.

Quote from: Yoshi on June 16, 2013, 03:52:59 PM
...

* Yoshi 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!

NanoSector

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
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Chalky

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...

Mick.

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.

Advertisement: