469,632 Members | 1,639 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,632 developers. It's quick & easy.

Site Header - Div Help Needed

PWS
I am trying to create a site header that consists of three images,
which should be displayed side by side. I want the header to be across
the entire width of the browser window, whatever the width.

To achieve this I the two outer Divs must be fixed at 150px wide, and
I have background images this width. The image for the middle div,
must grow or shrink as required, but must be centered.

Can anyone send me some CSS that achieves what I require.

Many thanks,

PWS

Jul 21 '07 #1
3 1977
PWS,

You're referring to the images as background images. If that's what
they are - i.e. stylistic ornaments - then I'm afraid CSS is of little
help, as it doesn't provide for scaling background images. (In CSS 3
there's going to be property called background-stretch for this
purpose.) All I can advise is to make the intrinsic width of your
image variable (possible with some vector graphics formats, maybe
SVG?) and rely on browser communicating the dimensions of the middle
div to the image.

Jul 21 '07 #2
PWS
On Jul 21, 10:13 pm, Krzysztof Maczy ski <198...@gmail.comwrote:
PWS,

You're referring to the images as background images. If that's what
they are - i.e. stylistic ornaments - then I'm afraid CSS is of little
help, as it doesn't provide for scaling background images. (In CSS 3
there's going to be property called background-stretch for this
purpose.) All I can advise is to make the intrinsic width of your
image variable (possible with some vector graphics formats, maybe
SVG?) and rely on browser communicating the dimensions of the middle
div to the image.
No idea what you are suggesting, but I do thank you for taking the
time to reply.

I have understood that what I wanted to do cannot be done.

Many thanks,

PWS

Jul 21 '07 #3
PWS wrote:
I am trying to create a site header that consists of three images,
which should be displayed side by side. I want the header to be
across the entire width of the browser window, whatever the width.

To achieve this I the two outer Divs must be fixed at 150px wide, and
I have background images this width. The image for the middle div,
must grow or shrink as required, but must be centered.

Can anyone send me some CSS that achieves what I require.
Are you looking for something like this? Notice that the left and right
images are contained within floated <spanrather than <div>, but that
the whole banner is wrapped in (one) <div>.

http://k75s.home.att.net/banner.html

--
-bts
-Motorcycles defy gravity; cars just suck
Jul 21 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by qazmlp | last post: by
7 posts views Thread by header_question | last post: by
11 posts views Thread by Steven T. Hatton | last post: by
6 posts views Thread by Johannes Bauer | last post: by
54 posts views Thread by richard_quick_uk | last post: by
18 posts views Thread by John Smith | last post: by
15 posts views Thread by Simon Cooke | last post: by
16 posts views Thread by wdh3rd | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.