Jump to content
  • 0

Не работает overflow hidden


Ubhra
 Share

Question

Добрый день.

В блоке article использую display:flex; и поочередно div и samp.

В итоге избыточный текст обрезается не корректно, последняя строка уходит за границы на половину. padding не помогает.

Скрытый текст

overflow.PNG.b8ed390537699d47ffab615fe8b23b41.PNG

 

<article>
	<div style="font-size:140%;">Наименование 1</div>
	<samp>text</samp>
	<div class="test">LLLLLLLL LLLLL LLLLL LLL LLLLLLLLL LLLLLLLLLLLL LLLLLLLLLLLL LLLLLLLLLLLLLL LLLLLLLLLL LLLLLLLLLLLL LLL LLL LLLLLLLLL LLLLLLLL LLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLL LLLLLLLLLL LLLLLLL LLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLL LLLLLLLLLLLL LLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLL LLLLLLLLLLLL LLLLLLLL LLLLLLLL LLLLLLLL LLLLLLLL LLLLLLLL LLLLLLLL LLLLLLLL LLLLLLLL LLLLLLLL LLLLLLLL LLLLLLLLLLLLLL LLLLLLLLLL LLLLLLLLLLLL LLL LLL LLLLLLLLL LLLLLLLL LL LLL LLLLLLLLLL LLLLLLLLLLLLL LLL LLL LLLLLLLLLLLLL LLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLLL</div>
	<samp>text</samp>
</article>
article{
	background-color:#dcdcdc;
	margin:10px auto;
	box-sizing:border-box;
	border:1px solid #a9a9a9;
	border-radius:10px;
	box-shadow:0 0 5px #c0c0c0;
	max-height:280px;
	padding:10px;
	display:flex;
	flex-direction:column;
}
.test{
	background-color:orange;
	height:200px;
	overflow:hidden;
	text-overflow:ellipsis;
	white-space:pre-wrap;
}

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Проверил ваш код в 4 браузерах, везде работает нормально, единственно что в IE не ставятся многоточия, но они там и не должны работать.

Так что что-то не то с вашим браузером

Edited by AlexZaw
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy