M
Mike Barnard
Hi.
This is such a basic question, I know. I can't seem to get my thick
head around the way browsers lay out blocks and elements.
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 branding within a div called mainwrapper. It has
an id'd heading which is text centred. I've tried putting another div
in at *** this point and centring the text within that but it then
dropped down below the image.
I know its simple, it usually is, but how can I centre the text
*within the remaining clear space* to one side of the image?
Thanks in advance.
<div id=mainwrapper>
<div id="branding">
<img src="alogo.gif" width="253" height="100" align="left">
***
<h1 id="toptitle">
Some text to be centred
</h1>
***
</div><!-- end of div branding -->
</div><!-- end of div mainwrapper -->
#mainwrapper{
width: 760px;
margin: 0 auto;
background-color: #F2FAFF;
text-align: left;
}
#branding{
float: left;
height: 100px;
}
#toptitle{
text-align: center;
color: #fd834b;
font-size: 200%;
}
This is such a basic question, I know. I can't seem to get my thick
head around the way browsers lay out blocks and elements.
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 branding within a div called mainwrapper. It has
an id'd heading which is text centred. I've tried putting another div
in at *** this point and centring the text within that but it then
dropped down below the image.
I know its simple, it usually is, but how can I centre the text
*within the remaining clear space* to one side of the image?
Thanks in advance.
<div id=mainwrapper>
<div id="branding">
<img src="alogo.gif" width="253" height="100" align="left">
***
<h1 id="toptitle">
Some text to be centred
</h1>
***
</div><!-- end of div branding -->
</div><!-- end of div mainwrapper -->
#mainwrapper{
width: 760px;
margin: 0 auto;
background-color: #F2FAFF;
text-align: left;
}
#branding{
float: left;
height: 100px;
}
#toptitle{
text-align: center;
color: #fd834b;
font-size: 200%;
}