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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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