tags:

views:

43

answers:

3

I am having trouble getting my left and right repeaters to fill the available space left on wide screens for a website I am working on. The left and right repeaters are background images (approxamately 350px wide) that I would like to show part of, or even repeat if the screen (visible area of screen shown in red) becomes wide enough.

Any help or suggestions would be greatly appreciated!

Thanks,

John

plan of website

+1  A: 

Your widths should be set to percentages.

Babiker
yes sure, http://tmw.isystems.co.nzThere are still a few hairy bits (search sits in the wrong place), content missing etc but I can fix those myself. Thanks for asking!
John Deverall
OK, thanks, I'll try the percentages thing. I'm not sure how I'll get around having fixed width images with percentages but I'll have a play and a google and get back to you
John Deverall
The percentages apply to the width of the containers, but not images. You're using js to inject your innerHTMLs, which is preventing people from taking a look at your source without a live DOM viewer, thus not being able to fully help.
Babiker
Thanks Babiker. However I don't think percentages work in my situation as I have a fixed width header that needs to marry up with my left and right wrappers to get the look right. If I set a percentage, then the wrappers don't necessarily sit flush against the header (depending on the width of the screen). I had the thought that I could split my header image, set a background colour, and float the header parts left and right respectively, with the background color filling in the middle, but before I try this I'm hoping to find another way around centering the page.
John Deverall
A: 

to elaborate more on babikers response:

assuming your repeaters are different images (if they aren't this becomes trivial)

There's a few ways off the top of my head (untested):

  • left div width 50% or body -- background has left repeater
  • right div width 50% -- background right repeater
  • absolute position, z-index up the content on top of it

  • body -- background has left repeater, position relative (maybe optional?)

  • wrapper div has no width -- background right repeater -- position relative (to body) left 50%
  • inner wrapper position absolute left (or margin left) -1/2 width of content (e.g. 480px for a 960px layout)

  • use display: table... or use tables lol

davidosomething
A: 

Kill the float on ids: right_wrap_container and right_repeater.

(Based on: http://tmw.isystems.co.nz/ as served at 16:25, New Zealand time.)

Brock Adams
Thanks, this worked a treat. I'm not sure how to pull off centering the page now that the repeat is happening but I'm sure I'll get it working in the end.
John Deverall
The current page looks centered, to me. Guess you figured it out. Is this question answered?
Brock Adams
yeah there was a posting on the margin: 0 auto; technique elsewhere on stackoverflow that I used. Thanks for your help! Slowly getting my head around this CSS thing... :)
John Deverall