Click to See Complete Forum and Search --> : shades on left and right


SZero
02-01-2008, 03:51 AM
hi every1
i see in some websites some shades (borders) on left and right and the page "doesn't have definite width", any idea how to do that?
ty..

KDLA
02-01-2008, 08:16 AM
Apply each of the backgrounds (right edge, left edge) to a div with a fluid width set, then nest the divs.

SZero
02-01-2008, 09:22 AM
in code plz, am not fimiliar with div, is it like tables or sth?

KDLA
02-01-2008, 09:34 AM
... am not fimiliar with div, is it like tables or sth?
:eek:

<body style="background: #fff;">
<div style="background: url(images/rightedge.jpg) repeat-y right top; padding: 0; margin: 0">
<div style="background: url(images/lefttedge.jpg) repeat-y left top; padding: 0; margin: 0;">
<p>text text text</p>
</div>
</div>
</body>

Reference: http://www.w3schools.com/css/css_background.asp

SZero
02-01-2008, 09:36 AM
i tried this

<DIV style="background:#F5F9FA url(templates/subSilver/banl.gif) top left repeat-y; position: absolute; bottom: 0px; left: 0px; top: 0px; width:32px; height:100%">&nbsp;</DIV>

but the height doesn't include the whole page, n when i remove height:100% it shows only small part

SZero
02-01-2008, 09:38 AM
oh didn't notice u answered, ty ^^

KDLA
02-01-2008, 09:40 AM
Height has to be applied to the body first, else the divs within there have no reference as to what 100% should refer to.
Take a look at this page:
http://www.maxdesign.com.au/presentation/page_layouts/
or this page: http://www.bigbaer.com/css_tutorials/css_three_column_liquid_maxheight_02.htm

SZero
02-01-2008, 09:51 AM
i tried as it said (adding height to page) but still didn't work, i saw the tutorial in the first site, it requires the body margin to be 0, but mine isn't

SZero
02-01-2008, 10:08 AM
problem solve, i removed body margin and used another DIV, ty so much for ur help..