Jump to content

Can I add a link in the header?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
10 replies to this topic

#1
daraclare

daraclare

    Learning Programmer

  • Members
  • PipPipPip
  • 44 posts
Is it possible to add a link to the below header without any text appearing or images changing?:

<div id="header">
  <div id="title">
  <h3>Business Intelligence, Data Warehousing <br />
    and Enterprise Performance Management</h3>
</div>
</div>

I just want visitors to be able to hover and click on the header,

Can anyone help?

Thanks in advance,
DC

Edited by James.H, 10 February 2010 - 11:02 AM.


#2
BlaineSch

BlaineSch

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,448 posts
If you want user to hover over you div with the id as header you can use some javascript:
<div onclick="window.location='http://www.google.com/';">Stuff</div>


#3
daraclare

daraclare

    Learning Programmer

  • Members
  • PipPipPip
  • 44 posts
Sorry do I put that in the header of every page? Sorry for stupid question...

#4
James.H

James.H

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 866 posts
Yes you do unless you use PHP, but that code is so small it's not worth using php.

#5
daraclare

daraclare

    Learning Programmer

  • Members
  • PipPipPip
  • 44 posts
Sorry I'm a beginner! Can I simply remove the "Stuff" part?

What am I doing wrong? Sorry I'm having a very slow nite... I want the whole header to be clickable... Should it be in the css?

<div id="header">
<div onclick="window.location='http://www.mywebsite.com/';">Stuff</div>
<div id="title">
<h3>Business Intelligence, Data Warehousing <br />
and Enterprise Performance Management</h3>
</div>
</div>

#6
daraclare

daraclare

    Learning Programmer

  • Members
  • PipPipPip
  • 44 posts
Can I add it in this part of the css?

#header { clear:both; width:900px; height:180px; background: url(../images/vertice_header.jpg) no-repeat;
margin:0; }

#7
Darkprogrammer996

Darkprogrammer996

    Newbie

  • Members
  • Pip
  • 2 posts
Wtf...

I use <a href="http://link.com><img src="Banner.png"></a>

Its working for me.

#8
Vswe

Vswe

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 9,552 posts
BlaineSch only posted an example, this is how you use it in your code(remember to change the url):
<div id="header"  onclick="window.location='http://www.mywebsite.com/';">
<div id="title">
<h3>Business Intelligence, Data Warehousing <br />
and Enterprise Performance Management</h3>
</div>
</div>


#9
daraclare

daraclare

    Learning Programmer

  • Members
  • PipPipPip
  • 44 posts
Thanks for all the help Sorry I didn't reply sooner. Think I bolted when the cursing started!

Much appreciated folks

#10
ManZzup

ManZzup

    Newbie

  • Members
  • PipPip
  • 10 posts
prefer using <a href="http://forum.codecall.net/html-programming/....." />
bacuse using jscript in the header would cause much problems if script is disabled by the client

#11
Howdy_McGee

Howdy_McGee

    Programmer

  • Members
  • PipPipPipPip
  • 135 posts
I agree, the anchor tag is probably you best bet IMO...