Forum: base
Page 14474
Subject: OT:HTML help


  Posted by: bman - [212281621] Wed, Apr 09, 2003, 23:40

Sorry guys.....I have no where else to turn...

I have a image similar to a banner size. I have it in the center of my webpage......I want each end to extend to the ends of the browser according to the browser size....i have an idea but it isn't working

I am using width 100% but it wont move....please help


The width 100 is not effecting the image.....I need the ends of the each side just to stretch out......can someone please help me

if you cant help please direct me to a great site to answer this question
 
1James K Polk
      ID: 114581215
      Thu, Apr 10, 2003, 01:45
This javascript says it will detect browser width and height dynamically. I've not tried it, but I assume you could put this on your page, dump the width value into a variable and then use that variable in the width property of your img tag.

I have no idea what your image looks like, but if both ends are solid blocks of color, you've got an easy fix. Just stick table cells on either side of the image, set the background color to match the colors on the edge of your image, and then let those table cells resize with the browser width to fill out to the sides of the page.
 
2blue hen
      Leader
      ID: 331038201
      Thu, Apr 10, 2003, 01:57
Yeah, and if it's not a solid color, you probably shouldn't be doing that anyway.
 
3bman
      ID: 39348106
      Thu, Apr 10, 2003, 09:00
Thanks..........one more thing here

If I want the Browser window to automatically default to a size and with no tool bars, Can I do this without running that script of

"width=500,height=400,scrollbars=yes,resizable=yes,status=no,toolbar=no,top=0,left=0");

Can it be done in the actual page......like in the HEAD or something?? So when the index.html page gets called the page itself knows to set itslef to those settings and not the link telling it that??

Last question......I am in a bind
 
4SillySpheres
      ID: 58512252
      Thu, Apr 10, 2003, 09:04
hmm, you can do it by writing java code for the onLoad event.

But I have to say that I get pretty annoyed when I visit a page and it resizes my browser and hides the tool bars. Nothing says porn site like resizing myu window and hiding tool bars.
 
5Code Cracker
      Leader
      ID: 1701629
      Thu, Apr 10, 2003, 09:05
Use [img src="myimage.jpg" width="100%"] and replace the [] with <>. Works for me....
 
6SillySpheres
      ID: 58512252
      Thu, Apr 10, 2003, 09:05
oh, I forgot to mention, the onLoad event is handled by the BODY tag. So you say something like [BODY onLoad = "javascript.somefunction" /]

I havent written java script in a while, but it is similar to that.