Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Feb 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation how is can help me with div problem

    Hi all

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

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

    CODE:

    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>

  • #2
    New Coder
    Join Date
    Jan 2012
    Posts
    36
    Thanks
    1
    Thanked 0 Times in 0 Posts
    repeat is like this:

    Code:
    }
    background-repeat:repeat-y;
    }

  • #3
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,609
    Thanks
    0
    Thanked 645 Times in 635 Posts
    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.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #4
    New Coder
    Join Date
    Feb 2012
    Posts
    22
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Try Setting Height to Auto,


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •