我该如何调整分区? [英] How Do I Resize The Div?

查看:56
本文介绍了我该如何调整分区?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<?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>';
?>







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;
}



当我在100行中写文本时很多

文本来自div(.org {})

i希望调整div的长度,因为文本

i想要调整第一个div(.back {}),只要secend div(.org {})


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{})

推荐答案

不要设置高度。

相反,看看这个:

https://developer.mozilla.org/en-US/docs/Web/CSS/min-height [ ^ ]



尝试90%和适合内容,看看哪一个更适合你。



希望这有帮助,
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,


这篇关于我该如何调整分区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆