3 replies [Last post]
danrocha
Offline
newbie
Campinas, SP - Brazil
Last seen: 16 years 37 weeks ago
Campinas, SP - Brazil
Timezone: GMT-3
Joined: 2004-02-09
Posts: 2
Points: 0

Hello

This is giving me headaches, since I don't even know where to start.

I have a layer which will contain blog posts (varying only vertically), but it has a shadow under it, so the background can't be set to stretch because it would deform the aspect.

http://nier.com.br/nuflash/teste/ (right where "text goes here" is written)

My first approach was to split the background into 3 sections: top, mid, bottom. Then I put the mid section as the background repeating, then I placed the other two sections as regular images inside the layer; the text would go between them.

But then I had problems with my text, as it must have margins to appear to be inside the box. But once I set margins, the top and bottom images would follow it too, and mess everything up!

Is there a smarter way to do it?

Please heeeelp!
I am searching the answer in the net for hours...

best regards
Daniel

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 1 year 51 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

boxed layer background - how to??

Hi

What you should have done was something like this (this is NOT code, but a description of what you needed to do):

Top Div has top section of background image
Middle Div has repeating section
Bottom Div has bottom section

INSIDE Middle Div is another Div for the text. This may need to have the style float:left as well. Use padding on this to give margins.
You may need another div inside, after this text div, like this:
<div style="clear:both;></div> to reset the float, otherwise the text div may overflow outside the middle div in non-IE browsers.

As it is, your demo works (apart form the text placement) in IE, but breaks in Mozilla and Firefox 0.8

Oh, and add position:absolute or relative to the div's too!

Trevor

Daybreak_0
Offline
Enthusiast
Sydney, Australia
Last seen: 16 years 49 weeks ago
Sydney, Australia
Timezone: GMT+10
Joined: 2003-11-15
Posts: 389
Points: 0

boxed layer background - how to??

The only way to learn is to do it yourself

danrocha
Offline
newbie
Campinas, SP - Brazil
Last seen: 16 years 37 weeks ago
Campinas, SP - Brazil
Timezone: GMT-3
Joined: 2004-02-09
Posts: 2
Points: 0

boxed layer background - how to??

Thanx a lot!

I'll study the examples and try to make it myself. I'll post the final results here! Smile

best regards
Daniel Laughing out loud