Click here to Skip to main content
15,868,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
<?php
echo'<html>';
echo'<body>';
echo'<head>';
echo'<link rel="stylesheet"type="text/css"href="css/style.css"></link>';
echo'<link rel="shortcut icon" href="pic/a.ico"></link>';
echo'<title>وب سایت رسمی سعید رجبی</title>';
echo'</head>';
echo'<div class="back"><div class="org"></div></div>';
echo'</body>';
echo'</html>';
?>


CSS
body
{
background-color:#f6e7b3;
}
.back
{
width:90%;
height:90%;
background-image:url("../pic/back2.png");
position:absolute;top:40px;left:60px;
background-repeat:repeat-y;
}
.org
{
width:1100px;
height:530px;
position:absolute;top:35px;left:65px;
background-color:#fffff2;
}

when i write text much for example in 100 line
the text come out of the div(.org{})
i want to resize div long as the text
i want resize the first div(.back{}) long as the secend div (.org{})
Posted

1 solution

Don't set the height.
Instead, take a look at this:
https://developer.mozilla.org/en-US/docs/Web/CSS/min-height[^]

Try 90% and fit-content, see which one is better for you.

Hope this helps,
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900