Reputation: 391
Recently I built website on Wordpress.com but my first text looks bad in mobile device the address is codecamp.kz. What is the problem?
<h1 style="text-align:center;">НАУЧИСЬ ПРОГРАММИРОВАТЬ НА iOS С НУЛЯ</h1>
<h3 class="r"></h3>
<div style="text-align:center;"><a class="button" href="https://docs.google.com/forms/d/e/1FAIpQLSfLVUls_4LAE-Gte_90wCHLwWulCS3N8aUix6mDZiw0XZFePQ/viewform">Подать заявку</a></div>
Upvotes: 1
Views: 199
Reputation: 1603
You'll need to use media queries to size your text correctly. Also, that empty <h3>
should probably be deleted. There are some odd  
in the title - perhaps WordPress is putting those in?
Media queries will allow you to apply different styling based on different parameters: width, height, orientation, pixel density, etc... Here are some helpful starter notes.
Here's an example of media queries:
/* the following rules will only apply when the browser width is between the following widths. You can change the min/max widths to suit your needs. */
@media all and (min-width: 640px) and (max-width:1280px) {
h1 {
font-size:16px; /* or whatever size and unit */
font-size:1.6rem; /* or whatever size and unit */
}
}
/* OR */
@media screen and (orientation: landscape) {
.element {
font-size:26px; /* or whatever size and unit */
font-size:2.6rem; /* or whatever size and unit */
}
}
Also, here are some media queries for standard devices.
Upvotes: 0
Reputation: 758
I think the problem is that the browser detects your text as one word and browser interprets it shouldn't be broken.
You don't need media queries for this, instead you only need one css rule:
h1 {
word-break: break-word;
}
For extra points! On your html you probably have something like:
{НАУЧИСЬ ПРОГРАММИРОВАТЬ НА iOS С НУЛЯ}
Just remove the
and that should do the trick.
Hope this is useful.
Edit Added an image of the result.
Upvotes: 1