Reputation: 119
I have the issue that on mobile devices with a screen size less/equal 320px the content is not shown 100% wide which you can see in this image:
I have also uploaded the files here: http://files.ailola.com/tmp/v1/privacy.php
I have been able to figure out the following points:
Removing the linked stylesheet does not solve the issue neither.
I just do not figure out the reason. Do you have an idea? Thanks so much for your help.
Upvotes: 0
Views: 151
Reputation: 679
We have to give width: 100%
to header, footer and #container.
The word-break property specifies how words should break when reaching the end of a line.
p {
word-break: break-word;
}
@media only screen and (max-width: 767px) {
header, footer, #container {
width: 100%;
padding: 0 25px;
}
}
Upvotes: 0
Reputation: 419
I fixed this with the following:
@media only screen and (max-width: 320px)
#container {
max-width: inherit;
width: 100%;
padding: 0 1em;
word-break: break-word;
}
The problem is because, inside the content, you have links, those are like an entire word, so the container tend to adapt to the longest word (this issue is present in some languages that have long words or expressions). In those cases, you have to use the property word-break
. You can find more info here
EDIT:
Apparently, the value break-word
of the property word-break
is deprecated. Also you can use the property overflow-wrap
with the value break-word
, as it is has a similar effect.
Upvotes: 1
Reputation: 26075
There are multiple paragraphs
on your page which are overflowing container due to default word wrapping strategy.
To fix the issue apply either word-break or overflow-wrap style to your paragraph:
p {
...,
word-break: break-all;
}
or
p {
...,
overflow-wrap: break-word;
}
Upvotes: 1