You are here: Re: graphic alignment « HTML « IT news, forums, messages
Re: graphic alignment

Posted by Beauregard T. Shagnasty on 02/07/07 20:48

charles cashion wrote:

> I am running Firefox 1.5.0.9 on Windows XP. My screen is probably
> 1024x768, but my window width is slightly less. I wanted my logo and
> my greeting to be on the top with the greeting inside of the first
> table width. As it is, the greeting.bmp graphic begins outside of the
> desired 700px width.
>
> This is what I want
>|---logo---|---blank---|---greeting---|
> 0 250 400 700

Try the following, but first convert your bitmap images to jpegs. Since
I don't have your images, you may need to adjust here. Use CSS and drop
the tables altogether. This layout will also float no matter the size of
your browser window.


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>family</title>
<style type="text/css">
body {
background: #fff;
margin: 0;
padding: 0;
}
..bannerleft {
float: left;
margin: 1em 0 0 3em; /* adjust margins to suit */
}
..bannerright {
float: right;
margin: 1em 3em 0 0;
}
hr {
border: thick solid blue;
}
</style>
</head>
<body>
<div id="banner">
<span class="bannerleft"><img src="logo.jpg" alt="[Logo]" title=""
width="250" height="110" /></span>
<span class="bannerright"><img src="greeting.jpg" alt="Greetings!"
title="" width="300" height="110" /></span>
</div>
<div>
<hr>
</div>

</body>
</html>


--
-bts
-Motorcycles defy gravity; cars just suck

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация