Reply to Re: Basic question. Centre text in the remaining space to right of image?

Your name:

Reply:


Posted by dorayme on 05/03/07 00:52

In article <ic6i33l8aiji4s1c5833eioq0bhc4h5esh@4ax.com>,
Mike Barnard <m.barnard.trousers@thunderin.co.uk> wrote:


> In a pages 'branding' area I want a logo on the left and a textual
> title centred in the remaining clear space to its right. At the
> moment the text displays as if centred, ie it stretches over two lines
> and the smaller text centres under the larger, but the whole text
> butts against the image. There is no space to its left and a lot to
> its right.
>
> Does that make sense?
>
> I have a div called brandin

'''
> <div id=mainwrapper>
>
> <div id="branding">
>
etc

Not quite sure what you want? Will this sort of thing do?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>Stacked Layers</title>
<style type="text/css">

#mainwrapper{
width: 760px;
height: 500px;
margin: 0 auto;
background-color: #F2FAFF;
text-align: left;
border: 1px red solid;
}

#branding img {float: left;}

#toptitle{
text-align: center;
color: #fd834b;
font-size: 200%;
margin-left:260px;
}

</style>

</head>
<body>

<div id="mainwrapper">
<div id="branding">
<img src="cope-003.jpg" width="253" height="100" alt="a demo
image">
<h1 id="toptitle">Some text to be centred</h1>
</div>
</div>

</body>
</html>

--
dorayme

[Back to original 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

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