News:

Wondering if this will always be free?  See why free is better.

Main Menu

Creating link to header

Started by f00ty, October 21, 2011, 06:50:53 PM

Previous topic - Next topic

f00ty

This is my current header code:

Quote
<div id="wrapper"', !empty($settings['forum_width']) ? ' style="width: ' . $settings['forum_width'] . '"' : '', '>
   <div id="header"', !empty($settings['header_logo_url_html_safe']) ? ' style="background-image: url(' . $settings['header_logo_url_html_safe'] . ')"' : '', '>
      <h1>', $context['forum_name'], '</h1>';

How I can add link to my header image?

Ricky.

Because your header image logo is background image for div header, you can't make it link .
You may need to use image with <img> tag instead of background image.

f00ty

Quote from: Ricky. on October 22, 2011, 01:20:03 AM
Because your header image logo is background image for div header, you can't make it link .
You may need to use image with <img> tag instead of background image.
Thank you for advice, but unfortunately I have no idea how to do it.  Something like this?

Quote<div id="wrapper"', !empty($settings['forum_width']) ? ' style="width: ' . $settings['forum_width'] . '"' : '', '>
    <div id="header"', !empty($settings['header_logo_url_html_safe']) ?: '', '>
        <a href="http://mysite.com">
        <img src="next.jpg" />
        </a>
        <h1>', $context['forum_name'], '</h1>';

Ricky.

Yes something like that.. !

Try it and adjust accordingly.

f00ty

I cannot figure it out. If I try for example this:

Quote<div id="wrapper"', !empty($settings['forum_width']) ? ' style="width: ' . $settings['forum_width'] . '"' : '', '>
    <div id="header"', !empty($settings['header_logo_url_html_safe']) ?: '', '>
        <a href="http://mysite.com">
        <img src="next.jpg" />
        </a>
        <h1>', $context['forum_name'], '</h1>';

I get errors. Any ideas how it should be done?

Advertisement: