• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

How to scale between different screen sizes?

Q&A Forum › Category: Questions › How to scale between different screen sizes?
0 Vote Up Vote Down
William Lucid asked 3 years ago

I post data to a domain hosted web site using a php file (collectdata2.php); hosted on domain server.  Php file receives data, echoes data back, then creates a web page every 15 minutes with updated data.   CSS I use looks good on my 22 inch monitor; however, does not look good on 15.6″ laptop screen. CSS can be found in the “collectdata2.php” file.  Any suggestions for improvement?

Observations-II web page

22″ Desktop monitor –looks good

15.6″ Laptop Screen –not so good

collectdata2.php

webInterface function that POSTs data.

 

Original version of this code by Stephan Borsay

 

William

 

Question Tags: CSS
3 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
 
As you said, it is a problem related to CSS and the web page not being responsive in all screen sizes.
 
I’m far (very far away) from being an expert in CSS, but something that usually keeps the web page centered and responsive is using flex-box or CSS grid layout. Take a look at the following links and see if you can implement one of them in your scenario.

  • https://css-tricks.com/snippets/css/a-guide-to-flexbox/
  • https://css-tricks.com/snippets/css/complete-guide-grid/

 
Let me know if you need further help.
 
Regards,
Sara
 
 

0 Vote Up Vote Down
William Lucid answered 3 years ago

Thank you Sara for the suggestions; used flex container to center content, simple and easy to use.

Laptop screen using Flex Container

Cellphone screen using Flex Container

collectdata2.php using Flex container

Best Regards,
William

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

That’s great!
I’m glad you found it useful.
I’ll mark this issue as resolved.
If you need further help, you just need to open a new question in our forum.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.