Edge backgrounds

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

Ok, the other day I came across a design that I liked, but figured, why bookmark it, i'll just check my history to bring it back up later tonight... Well I should have bookmarked it....

Here is the gist of it...

It had centered content, to fit 800x600, which I have seen many times, however on the left and right side fo the content, it has a gradient background on each side, going from black on the edges of the browser window, down to a solid color at the edge of the content, and no matter what you resize it to, the solid color is always at the edge and visible, it is the darker edge that gets moved out of the viewing area.

Now I can get it to work right on the right side, but on the left side, when you make the window more narrow, the dark black edge is what remains (on the left edge of the screen), not the solid color on the right of the background, which is up against the content.

Here is an example of how It should be, this first image is how the site looks at a wide resolution:

Now here is the desired look when the window is resized to be narrower:

Sigh, but here is what I get:

Any help on how to achieve this would be appreciated.

-Greg

He has: 1,758 posts

Joined: Jul 2002

Hmmm... it's hard to say without knowing what the page html structure is like...

Is this what you are trying to achieve?

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

Thank you, that is it, and WAY simpler than what I was trying to do..... LOL

Again, thanks.

-Greg

demonhale's picture

He has: 3,278 posts

Joined: May 2005

Heres a guess greg, if the markup is simply column to column, lets say theres "left", "center" , "right" tags on your css, it would probably be that "left" column has a "float: right;" style and the background is aligned "top right repeat-y" ... The "right" column would have the opposite which is "float:left;" and background aligned "top left repeat-y" as you may have already... If this is a full width design, they would probably use a percentage margin-left for the left column and percentage margin-right on the right column, and then assign a much larger percentage width on the "center" column, and it will push the sides the way you want them to... This is just a rough guess if I was making the design...

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.