Я работаю над небольшим сайтом, и я столкнулся с проблемой, когда содержимое моего сайта выходит за пределы страницы примерно на 100 пикселей.
Я хочу, чтобы мой контент не переполнялся, когда пользователю придется всегда прокручивать вправо, чтобы увидеть весь контент.
Я включил сюда фрагмент кода, который я создал для воспроизведения проблемы. Я пробовал использовать свойство переполнения, но, похоже, это не изменило мой результат.
Это может быть изображение, которое я использую на своем сайте (которое я не могу разместить здесь), но, может быть, оно слишком широкое? Я не уверен, почему контент внезапно переполняется. Спасибо за любую помощь!
.body
{
width: 100%;
}
.flex-wrapper
{
display: flex;
}
.image_div
{
flex: 1;
}
.text_div
{
flex: 1;
}
#image
{
width: 90%;
}
<body>
<p>Lorem 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.</p>
<div class="flex-wrapper">
<div class="image_div">
<img src="https://images.unsplash.com/photo-1494253109108-2e30c049369b?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&w=1000&q=80" id="image">
</div>
<div class="text_div">
<p>Lorem 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.</p>
</div>
</div>
</body>