configurar pagina html php para mobile 1

configurar pagina html php para mobile

@media screen and (min-width:300px) and (max-width:800px) {
body{font-size:0.8em;}
sidebar{display:none;}
}

Here is what the above code is Doing:
1. The first line is a comment. It’s not necessary, but it’s good practice to include it.
2. The second line is the @media rule. It’s telling the browser that the following code should only be applied if the screen is between 300px and 800px wide.
3. The third line is the CSS rule. It’s telling the browser to make the font-size of the body element 0.8em.
4. The fourth line is another CSS rule. It’s telling the browser to hide the sidebar element.

The @media rule is a very powerful tool. It allows you to create different styles for different devices.

Instructions
1.
In style.css, add a @media rule that will only apply the following CSS rules if the screen is between 300px and 800px wide.

2.
Add a CSS rule that will make the font-size of the body element 0.8em.

3.
Add a CSS rule that will hide the sidebar element.

4.
Save style.css.

5.
Refresh index.html in your browser.

6.
Resize your browser window to be between 300px and 800px wide.

7.
Refresh index.html in your browser.

8.
Resize your browser window to be less than 300px wide.

9.
Refresh index.html in your browser.

10.
Resize your browser window to be more than 800px wide.

11.
Refresh index.html in your browser.

12.
Resize your browser window to be between 300px and 800px wide.

13.
Refresh index.html in your browser.

14.
Resize your browser window to be less than 300px wide.

15.
Refresh index.html in your browser.

16.
Resize your browser window to be more than 800px wide.

17.
Refresh index.html in your browser.

18.
Resize your browser window to be between 300px and 800px wide.

19.
Refresh index.html in your browser.

20.
Resize your browser window to be less than 300px wide.

21.
Refresh index.html in your browser.

22.
Resize your browser window to be more than 800px wide.

23.
Refresh index.html in your browser.

24.
Resize your browser window to be between 300px and 800px wide.

25.
Refresh index.html in your browser.

26.
Resize your browser window to be less than 300px wide.

27.
Refresh index.html in your browser.

28.
Resize your browser window to be more than 800px wide.

29.
Refresh index.html in your browser.

30.
Resize your browser window to be between 300px and 800px wide.

31.
Refresh index.html in your browser.

32.
Resize your browser window to be less than 300px wide.

33.
Refresh index.html in your browser.

34.
Resize your browser window to be more than 800px wide.

35.
Refresh index.html in your browser.

36.
Resize your browser window to be between 300px and 800px wide.

37.
Refresh index.html in your browser.

38.
Resize your browser window to be less than 300px wide.

39.
Refresh index.html in your browser.

40.
Res

Similar Posts