Home >Backend Development >PHP Tutorial >css adaptive problem_PHP tutorial
Ask a question about CSS
Answer
DIV1 and DIV2 are inside DIV3.
At first I defined nothing on DIV2, its width is 100%, inside DIV3.
After DIV2 only defines float:left;, its width is adaptive, like now, but its layout exceeds DIV3.
How to make it still inside DIV3?
I just want to realize the width adaption of DIV2, and in DIV3, I don’t know if there is a simple way
Let me answer
Attachment: Your user group cannot download or view attachments
Other solutions
Increase the height of div3?
Other solutions
clear: both?
Other solutions
Either limit the height of div or adjust the height of div3
That's it. btw! ! You should be running it under firefox, right?
Other solutions
div3 settings overflow:hidden
or
Add a DIV below div2 to set clear:both
Other solutions
div3 settings overflow:hidden
or
Add a DIV below div2 to set clear:both
hansir published on 2009-6-17 10:49 [url=http://bbs.phpchina.com/redirect.php?goto=findpost&pid=1073643&ptid=128784]Link tag [img]http://bbs.phpchina.com /images/common/back.gif[/img][/url]
This is for turning pages. . If hidden. . How to turn the page? ?
It's better to overflow:auto; and let him scroll. .
Other solutions
overflow:hidden
Other solutions
Add a float attribute to div3
Other solutions
clear: both; tried it, but it doesn’t work;
overflow:hidden; is OK, but since my DIV2 is in two DIVs, I only said one to make the question simple, and both DIVs must be set to overflow:hidden;, which is too troublesome.
I just want to realize the width adaptation of DIV2, and in DIV3, I don’t know if there is a simple method. This should be a very common setting!
Other solutions
Post the code!