Lunarpages Web Hosting Forum

Author Topic: <div>?  (Read 2080 times)

Offline jhon

  • Intergalactic Cowboy
  • *****
  • Posts: 57
<div>?
« on: May 07, 2005, 09:49:41 PM »
Hi,

Another basic question. Thanks for any replies...

I would like to make a header page and open it from inside <dix> tags on my main page.  I have tried :

<div id="header"><src="http://MYSITE/header.htm"></div>

and veriations thereof (ie a href, href) with no good result.

Any help appreciate...
jhon

Offline jhon

  • Intergalactic Cowboy
  • *****
  • Posts: 57
<div>?
« Reply #1 on: May 07, 2005, 09:50:59 PM »
Oops ...<div> tag. Also, I have made the header page allready, if that wasn't clear.

Cheers,
jhon

Danielle

  • Guest
<div>?
« Reply #2 on: May 07, 2005, 09:54:43 PM »
Hi jhon,

Are you wanting to include the header at the top of your document? If so, you cannot use a div to do this, you need to use a server side include.  Here is a prior post detailing how to do this:

http://www.lunarforums.com/viewtopic.php?t=10346&highlight=ssi

Thanks.

Offline jhon

  • Intergalactic Cowboy
  • *****
  • Posts: 57
<div>?
« Reply #3 on: May 07, 2005, 09:59:46 PM »
Hi Danielle,

That's right. A header and a footer.

I'll check out the link.

Thanks a lot,

jhon

Danielle

  • Guest
<div>?
« Reply #4 on: May 07, 2005, 10:13:53 PM »
You're welcome  :thumb:

Offline jhon

  • Intergalactic Cowboy
  • *****
  • Posts: 57
<div>?
« Reply #5 on: May 07, 2005, 10:39:33 PM »
Brilliant!  It's working!

One more thing (for the moment. Haha)...

The header isn't centreing.  The code looks like this:

On Style.css:

div#header {
padding: 5px;
margin: 0px;
text-align: center;
}

On Main page:

<link rel=StyleSheet href="http://MYSITE/style.css" type="text/css" media="screen">
</head>
<body>
<div id="wrapper">

<!--#include virtual="header.htm" -->

On header.htm:

<div class="header">
<a href="http://www.MYSITE/x.htm">x</a>
</div>

Thanks for all of your help so far and I hope that you can help with this too!

Cheers,
jhon

Continued in new thread.