This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > November 2007 > How do I align logo and date?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How do I align logo and date?
SamU

2007-11-13, 3:07 pm

Hi,

I've used CSS before but now I'm really trying to stop using tables and go CSS all the way.

I want to put my logo on the top left side of the page and the date on the top right side.

If I were to do this w/ tables, I'd do the following:
<table width="80%" align="center">
<tr>
<td align="left"><img src="mylogo.gif"></td>
<td align="right">11/13/2007</td>
</tr>
</table>

I tried to do the same thing using CSS but not no luck. Could someone help me w/ this?

Here's what I have:
.banner-position { position: relative; margin-top: 10px; margin-left:auto; margin-right:auto; text-align; center; width: 80%; }

.logo-position { position: absolute; margin-top: 0px; margin-left: auto; margin-right: auto; text-align: left; }

.date-position { position: absolute; margin-top: 0px; margin-left: auto; margin-right: auto; text-align: right; }

And the HTML is:
<div class="banner-position">
<span class="logo-position"><img src="logo.gif" /></span>
<span class="date-position">11/13/2007</span>
</div>

What do I need to do to make this work?

Thanks,

Sam
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews