简体   繁体   English

我的文本和边框之间的空间有问题

[英]I have a problem with space between text and border

 .container{ margin: 0 auto; max-width:1200px; }.description{ width:100%; background-color:white; display:flex; border-spacing:80px; border-collapse:separate; border:1px solid black; }.about-me-title{ color:black; font-size: 55px; font-weight: bold; margin-bottom:100%; display:flex; flex-direction: column; align-items:start; border-bottom: 2px solid grey; }.about-me-text{ font-weight: bold; font-size: 25px; color:black; margin-bottom: 15px; }.about-me-little-text{ font-size: 20px; color:black; margin-bottom: 30px; } td{ vertical-align:top; border:1px solid black; padding: 3px; } tr{ border:1px solid black; }
 <div class="container"> <table class="description"> <tr> <td> <div class="about-me-title">O Mnie</div> </td> <td> <div class="about-me-text">What is Lorem Ipsum?</div> <div class="about-me-little-text">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry'sLorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </div> </td> </tr> <tr> <td> <div class="about-me-title">Doświadczenie</div> </td> <td> <div class="about-me-text">Why do we use it?</div> <div class="about-me-little-text">It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing</div> </td> </tr> <tr> <td> <div class="about-me-title">Osiągnięcia</div> </td> <td> <div class="about-me-text">Opis moich osiągnięć</div> <div class="about-me-little-text">Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia</div> <div class="about-me-text">Opis moich osiągnięć</div> <div class="about-me-little-text">Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia</div> <div class="about-me-text">Opis moich osiągnięć</div> <div class="about-me-little-text">Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia</div> </td> </tr> </table> </div>

Problem Image问题图片

Red arrow means space between border and my text, I want to cancel it.红色箭头表示边框和我的文本之间的空间,我想取消它。 I was looking for my problem on others websites, but I can't find a solve.我在其他网站上寻找我的问题,但我找不到解决方案。 If somebody have an idea, tell me pls.如果有人有想法,请告诉我。 Its really important for me..对我来说真的很重要。。

Are the tables necesary?桌子是必需的吗? They are a bit hard to style-contorl, but in case they are.它们有点难以控制样式,但以防万一。 If you remove the margin-bottom from the.about-me-title, the rows will shrink to the content height:如果从 .about-me-title 中删除 margin-bottom,行将缩小到内容高度:

 .container{ margin: 0 auto; max-width:1200px; }.description{ width:100%; background-color:white; display:flex; border-spacing:80px; border-collapse:separate; border:1px solid black; }.about-me-title{ color:black; font-size: 55px; font-weight: bold; /* margin-bottom:100%; */ display:flex; flex-direction: column; align-items:start; border-bottom: 2px solid grey; }.about-me-text{ font-weight: bold; font-size: 25px; color:black; margin-bottom: 15px; }.about-me-little-text{ font-size: 20px; color:black; margin-bottom: 30px; } td{ vertical-align:top; border:1px solid black; padding: 3px; } tr{ border:1px solid black; }
 <div class="container"> <table class="description"> <tr> <td> <div class="about-me-title">O Mnie</div> </td> <td> <div class="about-me-text">What is Lorem Ipsum?</div> <div class="about-me-little-text">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry'sLorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </div> </td> </tr> <tr> <td> <div class="about-me-title">Doświadczenie</div> </td> <td> <div class="about-me-text">Why do we use it?</div> <div class="about-me-little-text">It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing</div> </td> </tr> <tr> <td> <div class="about-me-title">Osiągnięcia</div> </td> <td> <div class="about-me-text">Opis moich osiągnięć</div> <div class="about-me-little-text">Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia</div> <div class="about-me-text">Opis moich osiągnięć</div> <div class="about-me-little-text">Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia</div> <div class="about-me-text">Opis moich osiągnięć</div> <div class="about-me-little-text">Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia</div> </td> </tr> </table> </div>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM