What's new

Welcome to the forum 👋, Visitor

To access the forum content and all our services, you must register or log in to the forum. Becoming a member of the forum is completely free.

New to HTML - site resize with varying screen sizes

Erratic

New member
Joined
Dec 21, 2022
Messages
1
Reaction score
0
HTML Coins
0
Hi everyone.

I've been toying around, googling, etc. with a little project at work. It's a kiosk of sorts for users to walk up and look up various information that they would otherwise have to go to different network drives and locations, or even other employees to pull up.

It works for the most part. Everyone likes it, but there are a few things that bother me with it.

It uses iframes to display info inside of a frame that has menu buttons on the left side, and depending on where they are on the site, can also have menu buttons on the bottom.

I'm assuming it's a CSS issue.

One issue:

depending on screen resolution, the page does not display properly. When I designed it, I designed it for screens that are full HD (1920x1080). Everything shows up beautifully (in my eyes). on iPads, everything shows up as well because the ipads have a higher resolution. iPhones, Android phones, and some laptop screens (that are still 1366x768) will have scroll bars.

Is there a proper way so the site will resize to maintain a ratio so there are no scroll bars?

See attached screenshots.

This is full screen on a laptop (or Touchscreen TV).

fullscreen.png


If a user is not using their web browser in full screen (or if they are on a laptop with a sub-HD screen), it'll look something like this, with the menu bar/buttons getting partially cut off.

window.png

Same issue if viewed on an iPhone:
iphone.png

On an iPad, everything looks fine (as far as I'm concerned):
ipad.png

Now I'm sure I'm doing my CSS incorrectly, as it's several pages long to incorporate various screen sizes of mobile devices. It pertained mainly to the width of the menu so it didn't get cut off. Here's a snippet:

Code:
/* ----------- iPhone 13, 13 Pro ----------- */

/* Portrait and Landscape */

@media only screen
  and (min-device-width: 390px)
  and (max-device-width: 844px)
  and (-webkit-min-device-pixel-ratio: 3) {
     .mobileShow { display: inline;}

}

/* Portrait */
@media only screen
  and (min-device-width: 390px)
  and (max-device-width: 844px)
  and (-webkit-min-device-pixel-ratio: 3)
  and (orientation: portrait) {
     .mobileShow { display: inline;}

.box{
    width:79%;
    float:left;
position: relative;
}

.menu{
    width:21%;
    float:left;
position: relative;
}

}

/* Landscape */
@media only screen
  and (min-device-width: 390px)
  and (max-device-width: 844px)
  and (-webkit-min-device-pixel-ratio: 3)
  and (orientation: landscape) {
     .mobileShow { display: inline;}

.box{
    width:88%;
    float:left;
position: relative;
}

.menu{
    width:12%;
    float:left;
position: relative;
}

}

/* ----------- Samsung Galaxy XCover Pro ----------- */

/* Portrait and Landscape */
@media only screen
  and (min-device-width: 360px)
  and (max-device-width: 7680px)
  and (-webkit-min-device-pixel-ratio: 4) {
  .mobileHide { display: none;}
    .box{
    width:79%;
    float:left;
position: relative;
}

.menu{
    width:21%;
    float:left;
position: relative;
}
}

/* Portrait */
@media only screen
  and (min-device-width: 360px)
  and (max-device-width: 780px)
  and (-webkit-min-device-pixel-ratio: 4)
  and (orientation: portrait) {
  .mobileHide { display: none;}
    .box{
    width:79%;
    float:left;
position: relative;
}

.menu{
    width:21%;
    float:left;
position: relative;
}
}

/* Landscape */
@media only screen
  and (min-device-width: 360px)
  and (max-device-width: 780px)
  and (-webkit-min-device-pixel-ratio: 4)
  and (orientation: landscape) {
  .mobileHide { display: none;}
    .box{
    width:79%;
    float:left;
position: relative;
}

.menu{
    width:21%;
    float:left;
position: relative;
}
}

/* ----------- iPad Pro 10.5" ----------- */

/* Portrait and Landscape */
@media only screen
  and (min-device-width: 834px)
  and (max-device-width: 1112px)
  and (-webkit-min-device-pixel-ratio: 2) {

     .mobileShow { display: inline;}
}

/* Portrait */
@media only screen
  and (min-device-width: 834px)
  and (max-device-width: 1112px)
  and (-webkit-min-device-pixel-ratio: 2) {

     .mobileShow { display: inline;}

.box{
    width:90%;
    float:left;
position: relative;
}

.menu{
    width:10%;
    float:left;
position: relative;
}
}

/* Landscape */
@media only screen
  and (min-device-width: 834px)
  and (max-device-width: 1112px)
  and (-webkit-min-device-pixel-ratio: 2) {

     .mobileShow { display: inline;}

.box{
    width:92%;
    float:left;
position: relative;
}

.menu{
    width:8%;
    float:left;
position: relative;
}
}
 

Theme customization system

You can customize some areas of the forum theme from this menu.

  • Wide/Narrow view

    You can control a structure that you can use to use your theme wide or narrow.

    Grid view forum list

    You can control the layout of the forum list in a grid or ordinary listing style structure.

    Picture grid mode

    You can control the structure where you can open/close images in the grid forum list.

    Close sidebar

    You can get rid of the crowded view in the forum by closing the sidebar.

    Fixed sidebar

    You can make it more useful and easier to access by pinning the sidebar.

    Close radius

    You can use the radius at the corners of the blocks according to your taste by closing/opening it.

  • Choose the color combination that reflects your taste
    Background images
    Color gradient backgrounds
Back