gpt4 book ai didi

html - 当中心div的内容增加时,左右div的高度不增加

转载 作者:太空宇宙 更新时间:2023-11-04 12:24:22 26 4
gpt4 key购买 nike

当中心div的内容增加时,左右div的高度没有增加。当内容溢出其高度时,我希望左右 div 也增加。

<! DOCTYPE html>
<html>

<head>

<style>


.header
{
background-color:grey;
margin-top:20px;
margin-left:20px;
margin-right:20px;
height:100px;
width:97%;
border:2px dotted green;
display:table;
}


.left
{clear:both;
background-color:grey;
margin-top:20px;
margin-left:10px;
float:left;
margin-right:10px;
height:100%;
width:10%;
display:table;
border:2px dotted green;

}


.center
{
background-color:grey;
margin-top:20px;
margin-bottom:10px;
margin-left:10px;
float:left;
height:100%;
width:75%;
display:table;
border:2px dotted green;
}

.right
{
background-color:grey;
margin-top:20px;
margin-bottom:10px;
margin-left:10px;
float:right;
height:100%;
width:10%;
display:table;
border:2px dotted green;
}



.footer
{
background-color:white;
border:2px dotted green;
margin-left:20px;
margin-right:20px;
height:50px;
width:97%;
display:table;
}



</style>

<title> Login </title>

</head>

<body text="black">


<div class="header">
HEADER

</div>


<div class="container">
<div class="left">
home<br>
profile<br>
services<br>

</div>

<div class="center">



What is HTML

HTML is an acronym which stands for Hyper Text Mark Up Language. Let's see what is Hyper Text and what is Mark Up Language?

Hyper Text: Hyper Text simply means "Text within Text". A text has a link within it, is a hypertext. Every time when you click on a word which brings you to a new webpage, you have clicked on a hypertext.

Markup language: A markup language is a programming language that is used make text more interactive and dynamic. It can turn a text into images, tables, links etc.
The word Markup refers to the symbol or Sequence of characters added to the ordinary text to define the structure of the text. It can also specify links to other documents.

An HTML document is made of many HTML tags and each HTML tag contains different content.
HTML is an acronym which stands for Hyper Text Mark Up Language. Let's see what is Hyper Text and what is Mark Up Language?

<p> Hyper Text: Hyper Text simply means "Text within Text". A text has a link within it, is a hypertext. Every time when you click on a word which brings you to a new webpage, you have clicked on a hypertext.</p>

<p> Markup language: A markup language is a programming language that is used make text more interactive and dynamic. It can turn a text into images, tables, links etc.</p>
The word Markup refers to the symbol or Sequence of characters added to the ordinary text to define the structure of the text. It can also specify links to other documents.

<p> An HTML document is made of many HTML tags and each HTML tag contains di

HTML is an acronym which stands for Hyper Text Mark Up Language. Let's see what is Hyper Text and what is Mark Up Language?</p>

Hyper Text: Hyper Text simply means "Text within Text". A text has a link within it, is a hypertext. Every time when you click on a word which brings you to a new webpage, you have clicked on a hypertext.

Markup language: A markup language is a programming language that is used make text more interactive and dynamic. It can turn a text into images, tables, links etc.
The word Markup refers to the symbol or Sequence of characters added to the ordinary text to define the structure of the text. It can also specify links to other documents.

An HTML document is made of many HTML tags and each HTML tag contains di

HTML is an acronym which stands for Hyper Text Mark Up Language. Let's see what is Hyper Text and what is Mark Up Language?

Hyper Text: Hyper Text simply means "Text within Text". A text has a link within it, is a hypertext. Every time when you click on a word which brings you to a new webpage, you have clicked on a hypertext.

Markup language: A markup language is a programming language that is used make text more interactive and dynamic. It can turn a text into images, tables, links etc.
The word Markup refers to the symbol or Sequence of characters added to the ordinary text to define the structure of the text. It can also specify links to other documents.

An HTML document is made of many HTML tags and each HTML tag contains di

HTML is an acronym which stands for Hyper Text Mark Up Language. Let's see what is Hyper Text and what is Mark Up Language?

Hyper Text: Hyper Text simply means "Text within Text". A text has a link within it, is a hypertext. Every time when you click on a word which brings you to a new webpage, you have clicked on a hypertext.

Markup language: A markup language is a programming language that is used make text more interactive and dynamic. It can turn a text into images, tables, links etc.
The word Markup refers to the symbol or Sequence of characters added to the ordinary text to define the structure of the text. It can also specify links to other documents.

An HTML document is made of many HTML tags and each HTML tag contains di


HTML is an acronym which stands for Hyper Text Mark Up Language. Let's see what is Hyper Text and what is Mark Up Language?

Hyper Text: Hyper Text simply means "Text within Text". A text has a link within it, is a hypertext. Every time when you click on a word which brings you to a new webpage, you have clicked on a hypertext.

Markup language: A markup language is a programming language that is used make text more interactive and dynamic. It can turn a text into images, tables, links etc.
The word Markup refers to the symbol or Sequence of characters added to the ordinary text to define the structure of the text. It can also specify links to other documents.

An HTML document is made of many HTML tags and each HTML tag contains di

HTML is an acronym which stands for Hyper Text Mark Up Language. Let's see what is Hyper Text and what is Mark Up Language?

Hyper Text: Hyper Text simply means "Text within Text". A text has a link within it, is a hypertext. Every time when you click on a word which brings you to a new webpage, you have clicked on a hypertext.

Markup language: A markup language is a programming language that is used make text more interactive and dynamic. It can turn a text into images, tables, links etc.
The word Markup refers to the symbol or Sequence of characters added to the ordinary text to define the structure of the text. It can also specify links to other documents.

An HTML document is made of many HTML tags and each HTML tag contains di

HTML is an acronym which stands for Hyper Text Mark Up Language. Let's see what is Hyper Text and what is Mark Up Language?

Hyper Text: Hyper Text simply means "Text within Text". A text has a link within it, is a hypertext. Every time when you click on a word which brings you to a new webpage, you have clicked on a hypertext.

Markup language: A markup language is a programming language that is used make text more interactive and dynamic. It can turn a text into images, tables, links etc.
The word Markup refers to the symbol or Sequence of characters added to the ordinary text to define the structure of the text. It can also specify links to other documents.

An HTML document is made of many HTML tags and each HTML tag contains di


</div>

<div class="right">
RIGHT
</div>


</div><div class="footer">
Footer
</footer>



</body>

</html>

最佳答案

您需要将 display:table-cell 放在左、中、右 div 上。并且您不能将 FLOAT 与 display 属性一起使用。使用 Float 显示将不起作用。所以从周围移除 float:left

无需在左、中、右 div 上放置 height:100%height:100% 仅适用于 body 内最外层的 div。

关于html - 当中心div的内容增加时,左右div的高度不增加,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28127946/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com