I make a page for different devices for the first time. It is necessary to make that if the width of the monitor is large enough (the monitor is more than 17 inches as a computer), then we give the following page:
#Menu{ width: 100%; padding: 0px; margin: 1px; background: #aaffff; } #Content{ width: 65%; padding: 0px; margin: 1px 1px 1px 5%; background: #ffaaff; float: left; } #AddContent{ width: 25%; padding: 0px; margin: 1px; background: #ffffaa; float: left; } <!DOCTYPE html> <html> <head> </head> <body> <div id="Menu"> Меню </div> <div id="Content"> Контент </div> <div id="AddContent"> Дополнитеьный блок </div> </body> </html> If the page on the tablet (more than 8 inches), then we issue the following page:
#Menu{ width: 100%; padding: 0px; margin: 1px; background: #aaffff; } #Content{ width: 90%; padding: 0px; margin: 1px 1px 1px 5%; background: #ffaaff; } #AddContent{ width: 90%; padding: 0px; margin: 1px 1px 1px 5%; background: #ffffaa; float: left; } <!DOCTYPE html> <html> <head> </head> <body> <div id="Menu"> Меню </div> <div id="Content"> Контент </div> <div id="AddContent"> Дополнитеьный блок </div> </body> </html> If the page on the smartphone (less than 8 inches), then we issue the following page:
#Menu{ width: 20px; padding: 0px; margin: 1px 1px 1px 5%; background: #aaffff; float: left; } #Content{ width: 90%; padding: 0px; margin: 1px 1px 1px 5%; background: #ffaaff; } #AddContent{ width: 90%; padding: 0px; margin: 1px 1px 1px 5%; background: #ffffaa; float: left; } <!DOCTYPE html> <html> <head> </head> <body> <div id="Menu"> М. </div> <div id="Content"> Контент </div> <div id="AddContent"> Дополнитеьный блок </div> </body> </html> And the role played by the width of the page (if the tablet is rotated to landscape orientation, the behavior should be like on a smartphone). And do not need the pixels, because smartphones can have a resolution of 1024x768, as well as computers.
What are the options to get this behavior (the font should also be selected)?