1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

css divs overlapping

Discussion in 'Web Design & Development' started by vance_iat, Feb 10, 2007.

Thread Status:
Not open for further replies.
  1. vance_iat

    vance_iat Thread Starter

    Joined:
    Apr 17, 2006
    Messages:
    78
    Please look at ecolibrio.com/new.html and you'll see that Layer 1 has content that overlaps into layer 2. What i want to do is when i type in content into layer 1 that it pushes down layer 2. Right now, layer 2 just sits there and layer 1's content is overlapping. I've tried clear:left and clear:both on layer 2 but doesn't work.
     
  2. namenotfound

    namenotfound

    Joined:
    Apr 30, 2005
    Messages:
    3,012
    You're using absolute positioning for both. Which means they're gonna stay put. Plus you defined a specific height which means the box won't expand as the text does.

    Try this:

    Code:
    <!--
    #Layer1 {
    	
    	width:882px;
    	
    	z-index:1;
    	border: 1px solid red;
    }
    #Layer2 {
    	
    	width:200px;
    	height:115px;
    	z-index:2;
    	top: 130px;
    	clear: left;
    	border: 1px black solid;
    }
    -->
     
  3. vance_iat

    vance_iat Thread Starter

    Joined:
    Apr 17, 2006
    Messages:
    78
    thanks namenotfound! that's was what i needed.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/542848

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice