SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast noy1213's Avatar
    Join Date
    Aug 2010
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Red face content and z-index

    hi everyone

    i have a weird problem

    when i put a long text in my content div everything looks fine

    but if i put just 1line the problem show up

    the best way to show you my problem is to present 2 html pages, with same css and same images files the only different is in the inner div (the text)


    first:
    http://sware.co.il/exp/index-new1.html

    second:
    http://sware.co.il/exp/index-new.html

    help me please

    thanks!
    CHROME, FF

    IE6?

  2. #2
    SitePoint Enthusiast gillian's Avatar
    Join Date
    Oct 2005
    Location
    Scotland
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi there,

    I've not fully tested this but i noticed that the negative margin is causing some layout issues, try removing it. The code is in your 'main2.css' file , line 235.

    #inner{
    margin-bottom:-151px;
    position:relative;
    z-index:99;}

    Hope that helps

  3. #3
    SitePoint Enthusiast noy1213's Avatar
    Join Date
    Aug 2010
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    youre right the margin is the problem but its must.

    i found a js solution for min 261px height (inner div)

    Code:
    var divh
    divh = document.getElementById('inner').offsetHeight;
    if (divh < 261)
    	document.getElementById('inner').style.height = 261+'px';
    if someone have a better solution i will be happy to hear

    thanks.
    CHROME, FF

    IE6?


Bookmarks

Posting Permissions

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