473,387 Members | 1,687 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to autoadjust width of a banner image ?

Hello. I would like to have an horizontal banner which autoadjust its
width to 100% of the page width. So, I've sliced the image banner in
three parts, but don't find a way to do the middle one autoadjust.
Knbowing that this middle image can be horizontally distorded without
problem about aspect.

Here is my test page with a dummy banner :

http://yohannl.tripod.com/autoadjust_banner/banner.html

As you can see, here, the banner has a fixed width. How to do the middle
part autoadjust its width. Going through table, javascript, else... I
don't know...

Please, does anyone of you know how to do ?
Dec 5 '07 #1
10 5417
rf
"Yohann L." <yo*****@invalid.onewrote in message
news:MP************************@news.tiscali.fr...
Here is my test page with a dummy banner :

http://yohannl.tripod.com/autoadjust_banner/banner.html

As you can see, here, the banner has a fixed width.
What banner? All I see is a bunch of ads.

Oh, you mean the coloured bit with the bit #.

If this is what your host does to your website then I would urgently look
for another host.

Get rid of the ads and then I may look at it.

--
Richard.
Dec 5 '07 #2
On Wed, 05 Dec 2007 12:01:17 +0100, Yohann L. <yo*****@invalid.onewrote:
Hello. I would like to have an horizontal banner which autoadjust its
width to 100% of the page width. So, I've sliced the image banner in
three parts, but don't find a way to do the middle one autoadjust.
Knbowing that this middle image can be horizontally distorded without
problem about aspect.

Here is my test page with a dummy banner :

http://yohannl.tripod.com/autoadjust_banner/banner.html

As you can see, here, the banner has a fixed width. How to do the middle
part autoadjust its width. Going through table, javascript, else... I
don't know...

Please, does anyone of you know how to do ?
Float the fixed size images left and right, set a repeat-x background of
the middle portion on a containing div, or just a block level div/element
with margins left and right exactly equal to the width of the images.

http://rwasmus.nl/banner/

You might want to set a min-width, as the right image would drop below the
'banner' on a screen narrower then the combined widths of the images.
--
Rik Wasmus
Dec 5 '07 #3
In article <D5******************@news-server.bigpond.net.au>,
rf@invalid.com says...
What banner? All I see is a bunch of ads.

Oh, you mean the coloured bit with the bit #.

If this is what your host does to your website then I would urgently look
for another host.

Get rid of the ads and then I may look at it.
As indicating in my first post, this page is just for test. So, i't not
my regular host and just a dummy banner in this test page.

And technically, about my question, do you have an idea ?
Dec 5 '07 #4
In article <op***************@metallium.lan>, lu************@hotmail.com
says...
Float the fixed size images left and right, set a repeat-x background of
the middle portion on a containing div, or just a block level div/element
with margins left and right exactly equal to the width of the images.

http://rwasmus.nl/banner/

You might want to set a min-width, as the right image would drop below the
'banner' on a screen narrower then the combined widths of the images.
Waow, thanks a lot, Rik. Not understand in detail yet, and I have to go
away, but I'll be back... :)
Dec 5 '07 #5
On Wed, 05 Dec 2007 12:45:42 +0100, Rik Wasmus
<lu************@hotmail.comwrote:
On Wed, 05 Dec 2007 12:01:17 +0100, Yohann L. <yo*****@invalid.one>
wrote:
>Hello. I would like to have an horizontal banner which autoadjust its
width to 100% of the page width. So, I've sliced the image banner in
three parts, but don't find a way to do the middle one autoadjust.
Knbowing that this middle image can be horizontally distorded without
problem about aspect.

Here is my test page with a dummy banner :

http://yohannl.tripod.com/autoadjust_banner/banner.html

As you can see, here, the banner has a fixed width. How to do the middle
part autoadjust its width. Going through table, javascript, else... I
don't know...

Please, does anyone of you know how to do ?

Float the fixed size images left and right, set a repeat-x background of
the middle portion on a containing div, or just a block level
div/element with margins left and right exactly equal to the width of
the images.

http://rwasmus.nl/banner/

You might want to set a min-width, as the right image would drop below
the 'banner' on a screen narrower then the combined widths of the images.
BTW: you do know gif is dreadfull right? Use png if you can, maybe jpeg,
only use gifs it you want transparancy in MSIE < 7.
--
Rik Wasmus
Dec 5 '07 #6
rf

"Rik Wasmus" <lu************@hotmail.comwrote in message
news:op***************@metallium.lan...
On Wed, 05 Dec 2007 12:45:42 +0100, Rik Wasmus
<lu************@hotmail.comwrote:
BTW: you do know gif is dreadfull right? Use png if you can, maybe jpeg,
only use gifs it you want transparancy in MSIE < 7.
On what evidence to you base these statements?

--
Richard.
Dec 5 '07 #7
On Wed, 05 Dec 2007 13:28:28 +0100, rf <rf@invalid.comwrote:
"Rik Wasmus" <lu************@hotmail.comwrote in message
news:op***************@metallium.lan...
>On Wed, 05 Dec 2007 12:45:42 +0100, Rik Wasmus
<lu************@hotmail.comwrote:
>BTW: you do know gif is dreadfull right? Use png if you can, maybe jpeg,
only use gifs it you want transparancy in MSIE < 7.

On what evidence to you base these statements?
GIF: limited pallet, dithering, often bigger then jpg despite the terrible
loss in detail.
PNG: lossless, alpha-transparancy, often smaller then gif, to name but a
few.
JPG: not lossless, allthough quite a full pallet, smaller then PNG, but
can create artifacts.

Oh, 'animated' is also a reason to choose GIF ofcourse. Then again, I hate
animations :)

For more information, google is your friend.
--
Rik Wasmus
Dec 5 '07 #8
Rik Wasmus wrote:
On Wed, 05 Dec 2007 13:28:28 +0100, rf <rf@invalid.comwrote:
>"Rik Wasmus" <lu************@hotmail.comwrote in message
news:op***************@metallium.lan...
>>On Wed, 05 Dec 2007 12:45:42 +0100, Rik Wasmus
<lu************@hotmail.comwrote:
>>BTW: you do know gif is dreadfull right? Use png if you can, maybe jpeg,
only use gifs it you want transparancy in MSIE < 7.

On what evidence to you base these statements?

GIF: limited pallet, dithering, often bigger then jpg despite the
terrible loss in detail.
I would to above GIF will have such effect if the source is
"photographic" in nature. The lossy compression distortion of the image
with JPG format is less noticeable to the human eye than the the
dithering in color reduction with GIF. On the other hand for hard-edge
limited color graphics, such as logos with text, this opposite is the
case. The GIF and palleted PNG shine maintaining a crisp look and lower
file size.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Dec 5 '07 #9
In article <op***************@metallium.lan>, lu************@hotmail.com
says...
Float the fixed size images left and right, set a repeat-x background of
the middle portion on a containing div, or just a block level div/element
with margins left and right exactly equal to the width of the images.

http://rwasmus.nl/banner/

You might want to set a min-width, as the right image would drop below the
'banner' on a screen narrower then the combined widths of the images.
OK, done ! It works ! I've choosen the second method with middle part in
a div because I have better control about horizontal position.

Now, I just have to limit the page width.

Thanks again, Rik
Dec 5 '07 #10
Rik Wasmus wrote:
On Wed, 05 Dec 2007 13:28:28 +0100, rf <rf@invalid.comwrote:
>"Rik Wasmus" <lu************@hotmail.comwrote in message
news:op***************@metallium.lan...
>>only use gifs it you want transparancy in MSIE < 7.
That's a common misconception.
>On what evidence to you base these statements?

GIF: limited pallet, dithering, often bigger then jpg despite the terrible
loss in detail.
Using gif for things like photos is silly. Use the right format for the
particular content.
PNG: lossless, alpha-transparancy, often smaller then gif, to name but a
few.
FYI, png does not have to use alpha transparency. Use an indexed (8-bit)
pallet and you'll get the same results as gif, with comparable or better
file sizes. A 32-bit png with alpha transparency can be quite weighty by
comparison. If your graphics editor doesn't give you a choice of
pallets, get a better editor.

BTW, I use png with indexed transparency all the time and IE has no
trouble with them whatsoever.

--
Berg
Dec 5 '07 #11

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

Similar topics

5
by: Chris Stromberger | last post by:
I have a div with a width of 40em (is em cool to use for width?). The situation below applies even if width is auto or 80% or something. Inside the div I am displaying some code with <pre> tags. ...
2
by: Dan V. | last post by:
Why does the banner image wrap around when I choose a small window size? http://officeactivate.com/schuit/index.shtml I am 1/2 way done a css book and am using this code from a CSS generator....
3
by: Rob R. Ainscough | last post by:
I'm confused the documentation says I can use a 500 x 70 pixel banner image (bmp or jpg) but when I do, the banner text is written on top of my image. Is there anything I can do to remove the...
3
by: Dan V. | last post by:
Hi there, How can I keep the banner image from wrapping when resizing the width of the window smaller? Firefox seems to do this but not I.E. Any ideas for: http://www.officeactivate.com/ ?...
1
by: mistahmiles | last post by:
I am designing a table-based menu. I want the table to take up the entire screen, as it is separating my banner image and the beginning of the text. Anyways, as you can see, I used the "width:100%"...
50
by: Dave Rado | last post by:
Hi I've created a banner with a drop-shadow using a div - there's a mock- up at http://tinyurl.com/6n7czu . The only problem is that the way I've done it, I have to specify the width of the div...
1
by: thesti | last post by:
hello, i'm trying to design a web. in the header, i create an outer-div which consist of three inner-divs. the html looks like this <div align="center" id="banner-header"> ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...

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.