473,789 Members | 2,957 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to centre relative to page, not floated image


The page at:

<http://www.westmidland birdclub.com/club/logo.htm>

has a logo "floated" in the top left, and another "floated" in the top
right, with the H1 heading centred between them (and this centred on the
page).
I would like to only have the logo top left, but retain the centering of
the heading, on the page.

How is this best achieved?
--
Andy Mabbett
USA imprisons children without trial, at Guantanamo Bay:
<http://news.bbc.co.uk/1/hi/world/south_asia/2970279.stm>
<http://web.amnesty.org/library/Index/ENGAMR510582003 ?open&of=ENG-USA>
Jul 20 '05 #1
16 2900
In article <mz************ **@pigsonthewin g.org.uk>, usenet200305
@pigsonthewing. org.uk says...

The page at:

<http://www.westmidland birdclub.com/club/logo.htm>

has a logo "floated" in the top left, and another "floated" in the top
right, with the H1 heading centred between them (and this centred on the
page).

I would like to only have the logo top left, but retain the centering of
the heading, on the page.

How is this best achieved?


I don't know about 'best', but how about setting it as the page
background & fix up the h1 height to suit?

Example: http://porjes.haxorz.org/bird.html

Jul 20 '05 #2
In article <mz************ **@pigsonthewin g.org.uk>,
Andy Mabbett <us**********@p igsonthewing.or g.uk> wrote:
The page at:

<http://www.westmidland birdclub.com/club/logo.htm>

has a logo "floated" in the top left, and another "floated" in the top
right, with the H1 heading centred between them (and this centred on the
page).
I would like to only have the logo top left, but retain the centering of
the heading, on the page.


How about having the logo absolutely positioned? Or even better, since
the text in your H1 already conveys what the logo cannot do any better
(in a textual context): set the logo as a background image to the H1;

h1 { text-align: center; background: url("logo.gif") transparent top
left no-repeat; color: #000; }

<h1>West Midland Bird Club</h1>

--
Kris
kr*******@xs4al l.netherlands (nl)
"We called him Tortoise because he taught us" said the Mock Turtle.
Jul 20 '05 #3
Andy Mabbett wrote:

<http://www.westmidland birdclub.com/club/logo.htm>

has a logo "floated" in the top left, and another "floated" in the
top right, with the H1 heading centred between them (and this
centred on the page).

I would like to only have the logo top left, but retain the
centering of the heading, on the page.

How is this best achieved?


float takes the item of the normal document flow, so it will not
affect margins set on the h1. Thus,

h1 {margin-left: auto; margin-right: auto}

float the image left as before.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #4
In message <EpVPa.44171$H1 7.13526@sccrnsc 02>, Brian
<br***@wfcr.org .invalid-remove-this-part> writes
<http://www.westmidland birdclub.com/club/logo.htm>
has a logo "floated" in the top left, and another "floated" in the
top right, with the H1 heading centred between them (and this
centred on the page).
I would like to only have the logo top left, but retain the
centering of the heading, on the page.
How is this best achieved?


float takes the item of the normal document flow, so it will not
affect margins set on the h1. Thus,

h1 {margin-left: auto; margin-right: auto}

float the image left as before.


Thank you, but that doesn't seem to work.

Compare the common centring of the H1 ("West Midland Bird Club"), H2
("New Logo") and the large graphic on:

<http://www.westmidland birdclub.com/club/logo.htm>

(which has two logos, top left and right)

and then:

<http://www.westmidland birdclub.com/club/test.htm>
which has one.

In both cases, H1 has auto margins, as you suggest.
--
Andy Mabbett
USA imprisons children without trial, at Guantanamo Bay:
<http://news.bbc.co.uk/1/hi/world/south_asia/2970279.stm>
<http://web.amnesty.org/library/Index/ENGAMR510582003 ?open&of=ENG-USA>
Jul 20 '05 #5
Andy Mabbett wrote:
float takes the item of the normal document flow, so it will not
affect margins set on the h1. Thus,

h1 {margin-left: auto; margin-right: auto}

float the image left as before.


Compare the common centring of the H1 ("West Midland Bird Club"), H2
("New Logo") and the large graphic on:

<http://www.westmidland birdclub.com/club/logo.htm>

(which has two logos, top left and right

<http://www.westmidland birdclub.com/club/test.htm>

which has one.


Both have css errors. Does fixing them solve anything? Probably not,
but one can always hope.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #6
In message <bH5Qa.48527$Ph 3.3769@sccrnsc0 4>, Brian
<br***@wfcr.org .invalid-remove-this-part> writes
Compare the common centring of the H1 ("West Midland Bird Club"), H2
("New Logo") and the large graphic on:
<http://www.westmidland birdclub.com/club/logo.htm>
(which has two logos, top left and right
<http://www.westmidland birdclub.com/club/test.htm>
which has one.
Both have css errors.


Fixed, thank you.
Does fixing them solve anything?


No :-(

--
Andy Mabbett
USA imprisons children without trial, at Guantanamo Bay:
<http://news.bbc.co.uk/1/hi/world/south_asia/2970279.stm>
<http://web.amnesty.org/library/Index/ENGAMR510582003 ?open&of=ENG-USA>
Jul 20 '05 #7
In article <dE************ **@pigsonthewin g.org.uk>, usenet200305
@pigsonthewing. org.uk says...
In message <kr************ *************** **@news1.news.x s4all.nl>, Kris
<kr*******@xs4a ll.netherlands> writes
I would like to only have the logo top left, but retain the centering of
the heading, on the page.


How about having the logo absolutely positioned?


Thank you (and to others who have replied).

Unfortunately, that allows the image to overlay the text, at some
resolutions. window sizes.

....
If that's a problem, and you don't want to use a background image, then
how about including the image in the h1, adding judicious margins, and
absolutely positioning the image?
Jul 20 '05 #8
On Sat, 12 Jul 2003 17:15:02 +0100, Andy Mabbett
<us**********@p igsonthewing.or g.uk> wrote:
In message <EpVPa.44171$H1 7.13526@sccrnsc 02>, Brian
<br***@wfcr.or g.invalid-remove-this-part> writes
<http://www.westmidland birdclub.com/club/logo.htm>
has a logo "floated" in the top left, and another "floated" in the
top right, with the H1 heading centred between them (and this
centred on the page).
I would like to only have the logo top left, but retain the
centering of the heading, on the page.
How is this best achieved?
float takes the item of the normal document flow, so it will not
affect margins set on the h1. Thus,

h1 {margin-left: auto; margin-right: auto}

float the image left as before.

Thank you, but that doesn't seem to work.


This will only work if you also "shrink" the width of the header to
something less than 100%. e.g: width: 15em. (you'll have to play to get
an appropriate size). Or alternatively just leave an empty DIV on the
right, of the same width as the logo.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #9
In article <wl************ **@pigsonthewin g.org.uk>, usenet200305
@pigsonthewing. org.uk says...
In message <MP************ ************@ne ws.CIS.DFN.DE>, Jacqui or Pete
<po****@spamcop .net> writes
.... http://www.westmidlandbirdclub.com/club/logo.htm
http://porjes.com/bird1.html


Thanks, but that only seems to work because you have:

h1 {
margin: 50px 154px 0px 154px;
height: 82px;
}

Given that the image is 122x154 pixels, why the other figures?


Erm, I made them up because they seemed to work :0(

As you're trying to align text with an image it's probably best to use
explicit px line height and font-size. IMHO px are only useful for this
purpose and, given that you're going to use fairly large 'h1-size'
values this shouldn't cause accessibility problems.
Incidentally, on your page, the H! & H2 are overlaid, in small windows,
in Opera 7.10

That'll be the lack of px-sized fonts, then.

I've had another play with it and the trouble is that zooming px-sized
text in (eg) Mozilla resizes the text without resizing the image (a bug
in my book[1] ) so, actually, I don't know a good answer to this one.

Anyone else?

[1] Because what is the point of having the option of px-sized text if
you can't use it to align text with images? What other use could it
have?
Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
11019
by: Ken Kast | last post by:
Here's my situation. I have a statically positioned table that has an image in a cell. I also have some layers, defined by absolute-positioned DIVs for some animation. Everything works until I scroll/resize. Then the image "moves" on the screen but the animation doesn't. The net effect is that their relative positioning changes. I'd like to have it be that they would stay in the same relative position. I want to keep the image as an...
1
2398
by: Graham J | last post by:
I submitted a variation on this on the Opera forum but I thought I'd bring it up here too as a more general HTML query. Consider this code (I've shown it the old fashioned presentational way but the same problem would happen with CSS): <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Changed behaviour in Opera 7.21</title>
0
2354
by: Mike Kozlowski | last post by:
I have an absolutely positioned block on the top of my page, a block floated left, and a third block in the normal flow. IE6 and Mozilla 1.4 disagree on where the floated block should be placed -- IE thinks its top margin should be relative to the containing block (i.e., the body), while Mozilla thinks it should be relative to the bottom of the absolutely positioned block. My instincts, of course, are to assume that Mozilla's correct --...
4
8279
by: boclair | last post by:
Is this a known problem with IE6? I have a provisional two column layout, the left menu column is positioned absolute. The contents column is positioned relative. The contents column has an image floated right. The placement is there in IE6 but not the image. It does not matter whether the DTD is strict or transitional
17
3051
by: George Hester | last post by:
http://tinyurl.com/5uj6w The lower middle icon the "block" should not drop down when the mouse is over it. How can I stop that? Also the navigation divs both top and bottom should follow the scroll right. Both of these issues occur in IE 6 but not in IE 5.5. You can get the horizontal scroll bar for the window by increasing the size of the image wider than the display area of the window. Assumes 600x800 default display size. Thanks...
2
3874
by: Martin Geisler | last post by:
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQBDNmLx6nfwy35F3TgRAtjIAJ9ryEjr0kaaEapRD0z1bHQYmKi+1wCdEOZC /wY2033SyIVl0za07v8RMkk= =6BZ+ -----END PGP SIGNATURE-----
13
2470
by: Griff | last post by:
Hi Sorry no screen shots or links...I want to achieve the following visual effect: I want three boxes to appear on screen, all within a parent box (so 4 in total). Concerning the three inner boxes, I want them to appear in a two column format. One box in the left hand column that will contain an image and
7
9305
by: Cruelemort | last post by:
All, I have a div in my page that has a set width of 1000px, height of 200px, inside this i declare two more div's, both relatively positioned and floated left, the first is placed to the top left of the box and is a 30px square, the other one is set to 970px and is naturally positioned next to the square and so fills all the way to the right hand edge of the box. Now i need the second (wider) box to overlap the square and so start
0
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10410
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10139
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7529
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5418
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3701
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.