9
I have the following div
on my page html
<div id="divContent" class='content'>
Bem vindo ao meu site <br />
1 index index index index index index index index <br />
2 index index index index index index index index <br />
3 index index index index index index index index <br />
4 index index index index index index index index <br />
5 index index index index index index index index <br />
6 index index index index index index index index <br />
7 index index index index index index index index <br />
8 index index index index index index index index <br />
9 index index index index index index index index <br />
10 index index index index index index index index <br />
11 index index index index index index index index <br />
12 index index index index index index index index <br />
13 index index index index index index index index <br />
14 index index index index index index index index <br />
</div>
Opening the page in the computer browser, all your contents is showoff. But when opening in a cellular for example, the content does not fit on the screen, hiding the last lines of content from DIV
.
Is there any way put a scroll only in case of don’t fit the content on smaller screens?
Do you say a horizontal scroll? Could you add the
css
who already owns?– Randrade
uses media query, take a look at my answer, you can detect monitors with smaller resolution and apply css to show scroll.
– RBoschini
the media query did not work
– Raphael Prado de Oliveira
See this Fiddler https://jsfiddle.net/rboschini/05f0pxuc/
– RBoschini
Remove these br’s ai and add a <p> puts the text with some alignment and sets a media query for low resolutions, if it is plain text or need media query why the browser itself takes care of leaving the text readable.
– Gabriel Rodrigues
Managed to make??
– RBoschini