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 7 of 7
  1. #1
    New to the CF scene
    Join Date
    May 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problem with wrapping

    First od all, sorry for my language

    So, this is my problem, as you can see in the picture

    Black div layer is inside white div layer. and text is inside black layer.
    But, white need to be bottom:0px; and text need to be in black layer, and black layer need to be bottom:70px;. Please help

    This is my code:

    Code:
    .white {
    	background-color:#FFFFFF;
    	width: 650px;
    	height: 100%;
    	bottom: 0px;
    	position: absolute;
    	border-right-width: 2px;
    	border-left-width: 2px;
    	border-right-style: solid;
    	border-left-style: solid;
    	border-right-color: #429bff;
    	border-left-color: #429bff;
    	margin-left: -325px;
    	top: 0px;
    	left:50%;
    }
    .black {
    	background-color:#000000;
    	color: #FFFFFF;
    	position: absolute;
    	width: 500px;
    	height: 100%;
    	bottom: 70px;
    	top: 170px;
    	left: 10px;
    	
    }
    Attached Thumbnails Attached Thumbnails Problem with wrapping-problem.jpg  

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello mr.hoax,
    Something like this?
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    html, body {
    	font: 100% "Comic Sans MS";
    	background: #FC6;
    }
    * {
    	margin: 0;
    	padding: 0;
    }
    .white {
    	width: 650px;
    	position: absolute;
    	top: 0;
    	bottom: 0;
    	left: 50%;
    	margin-left: -325px;
    	border: 2px solid #429bff;
    	border-top: none;
    	border-bottom: none;
    	background: #fff;
    }
    .black {
    	width: 500px;
    	position: absolute;
    	bottom: 70px;
    	left: 10px;
    	background: #000;
    	color: #fff;	
    }
    </style>
    </head>
    <body>
        <div class="white">
            <div class="black">
                <p>
                    Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna 
                    aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no 
                    sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam 
                    nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo 
                    duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
                </p>
            <!--end .black--></div>
        <!--end .white--></div>
    </body>
    </html>
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    New to the CF scene
    Join Date
    May 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    no, does not work. if you add more text, text is going up. but my text must start on top: 170px; and end at bottom: 70px; but must expand white layer. and white layer must be bottom: 0px;

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Black div layer is inside white div layer. and text is inside black layer.
    But, white need to be bottom:0px; and text need to be in black layer, and black layer need to be bottom:70px;. Please help
    Do you really need those absolute positions? Do you know the pitfalls of using them all over the page?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #5
    New to the CF scene
    Join Date
    May 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i don't know how to use that?! i'm troubling with this last 3 days and it's killing me. I'm want to learn, but i don't know how to make it, and i dont know what to google to solve my problem.

  • #6
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Please post your html code aswell, or a link to your page would be much better.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #7
    New to the CF scene
    Join Date
    May 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    #wrapper {
    	position: absolute;
    	width: 650px;
    	bottom: auto;
    	top: 0px;
    	left: 50%;
    	margin-left: -325px;
    	background-color:#FFFFFF;
    	border-right-width: 2px;
    	border-left-width: 2px;
    	border-right-style: solid;
    	border-left-style: solid;
    	border-right-color: #429bff;
    	border-left-color: #429bff;
    	
    }
    .sadrzaj {
    	position: relative;
    	width: 100%;
    	left: 10px;
    	width: 500px;
    	top: 30px;
    	margin-bottom: 100px;
    	background-color:#000000;
    	color: #FFFFFF;
    }
    ok, i solved, well part of it, but the worst part is that i don't know how is this working now. i accedentaly make this and it worked. i'm good for now, but i will make a new css when i cache some time. Thank you all for helping me.


  •  

    Posting Permissions

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