Jump to content

How Do I Do This?


refiking

Recommended Posts

I am trying to place the greeting and time on the right side of the header.  Right now, it is on a separate line.  Here is the website so you can see what I am talking about:

 

http://ctpweb.com/leads/preheader.php

 

Here is the code of the header:

 

<html>
<body>

<!-- Containing div -->
<div style="width: 100%; margin-left: -1px; margin-right: 20px; margin-top: 15px; border: 0px;">

<!-- Header table -->
<table style="width: 100%; margin: 0px; padding: 0px; border-collapse:collapse; border-spacing:0; border: 0px;" cellpadding="0px" cellspacing="0px">

<!-- Top row -->
<tr>
<td colspan="2">

<!-- Header div. Adjust to fit height of your header. Replace image URL with your own -->
<div style="width: 100%; height: 100px; background-image: url('bg.gif'); background-repeat: repeat-x;">

<!-- Header image. Replace image URL with your own -->
<img src="amdata.gif" style="border: 0px; margin: 0px;" />

<!-- End header div -->
</div>

<!-- End top row -->
</td>
</tr>

<!-- Bottom row -->
<tr>

<!-- Greeting column -->
<table width=100% style="font-size: 18px; color: white; border:1px solid black; background-image: url('bg.gif'); background-repeat: repeat-x;">
<tr>
<td style="text-align:left;">Hello <?=$firstname ?></td>
  <td <? PRINT "<br />";?></td>
  <td style="text-align:right;"><?=date("Y")?></td>
</tr>
</table>


<!-- Continue with the rest of your web page's content -->
<p>  </p>

<!-- End containing div -->
</div>

</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/55001-how-do-i-do-this/
Share on other sites

<div id="header">
<div id="headerImage"><img /></div>
<div id="headerContainer">
	<div id="headerGreeting">HELLO</div>
	<div id="headerTime">2007</div>
</div>
</div>

 

Absolute positioning to place the headerContainer directly on top of everything else in the header div.

Link to comment
https://forums.phpfreaks.com/topic/55001-how-do-i-do-this/#findComment-271916
Share on other sites

The code I gave you wasn't meant to be drag and drop ready. I was just trying to point you in the right direction so you could take the next step. Granted you could use that code, you'd just have to modify it or your style guide.

 

Give a man a fish, and feed him for a day. Teach a man to fish, and you'll feed him for his life. ;)

Link to comment
https://forums.phpfreaks.com/topic/55001-how-do-i-do-this/#findComment-271992
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.