...

View Full Version : how is can help me with div problem



xdroid
02-02-2012, 08:27 PM
Hi all

i have problem with div height it's not repeat-y background image

i set div id problem (#problem1 AND #problem2)

CODE:



<div style=" width:500px; background:#000;">
<div style="width:20px;height:41px;background: url(main.png) no-repeat 0 0;float:left;"></div>
<div style="width:80px;height:41px;background: url(main.png) no-repeat -20px 0;float:right;"></div>
<div style="height:41px;background: url(a_bg.png) repeat-x;margin-right:40px;"></div>

<div id="problem1" style=" height:100%;width:4px;background:url(left_bg.png) repeat-y ;float:left;"></div>
<div style="min-height:100%; width:4px;background: url('right_bg.png') repeat-y;float:right;"></div>
<div id="problem2" style="margin-right:4px;">HERE IS dynamic contact</div>


<div style="width:4px;height:7px;background:url(left2_bg.png) no-repeat;float:left;"></div>
<div style="width:4px;height:7px;background:url(right2_bg.png) no-repeat;float:right;"></div>
<div style="height:7px;background:url(b_bg.png) repeat-x;margin-right:4px;"></div>
</div>

gingerbread
03-01-2012, 04:35 PM
repeat is like this:


}
background-repeat:repeat-y;
}

felgall
03-01-2012, 09:09 PM
The problem is probably with the height:100% as that will be 100% of the height of its container (the top div in your code) and as that container doesn't have a height specified it will only be as high as is needed to contain its content. Adding height:100% to the first div will expand that div and allow the div within it to be bigger as well.

There's nothing wrong with your background:url(left_bg.png) repeat-y as everything in that is specified in the correct order. It is that the div isn't as high as you were expecting.

jace_co_uk
03-01-2012, 09:21 PM
Try Setting Height to Auto,



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum