Home Events! Entrance Everyone Wiki Search Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
November 23, 2024 - @434.92 (what is this?)
Forum activity rating: Three Stars Posts: 31/1k.beats Unread Topics | Unread Replies | My Stuff | Random Topic | Recent Posts    Start New Topic
News: :ha: :pc: Hello Melonland! :pc: :happy:

+  MelonLand Forum
|-+  World Wild Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  how to make my site more mobile friendly?


« previous next »
Pages: [1] Print
Author Topic: how to make my site more mobile friendly?  (Read 191 times)
candycanearter07
Sr. Member ⚓︎
****


i like slimes

⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: candycanearter
Itch.io: My Games

View Profile WWW

Suck At Something September - Did It!uh oh! a pigeon got in!Artsy Candy CaneJoined 2024!
« on: August 02, 2024 @159.12 »

hi,

ive been getting some complaints from users about how my site is unreadable when on mobile or "not in full screen".. how can i make it more viewable for mobile?
Logged

new to oldnet be nice




larvapuppy
Full Member ⚓︎
***


⛺︎ My Room

View Profile WWW

First 1000 Members!Joined 2023!
« Reply #1 on: August 02, 2024 @170.66 »

Hi! You can make your site appear differently in different sizes by adding a rule like this to your css:

Code
@media (max-width : 1920px){
}

... and changing the pixel amount to whatever size you like! For example, on my site I have all of my desktop specifications inside a 1920px rule, and all of my mobile specifications inside a 750px rule.

Just put all your selectors that you want to differ between sizes under each rule, and change the properties accordindly. For example, on my site I have this code:

Code
@media (max-width : 1920px){
  #navigation {
    display: block;
  }
  #mobilenav{
    display: none;
  }
}

@media (max-width:750px) {
  #navigation {
    display: none;
    }
  #mobilenav {
    display: block flex;
    }
}

My navigation bar is in a vertical format in desktop, and a horizontal format in mobile, so I have the vertical one set to appear and the smaller one to disappear on larger displays - and vice versa.

Some other things that are helpful to have change between display sizes: box width, text size, the % of space an image takes up, and so on. It's helpful to check out sites you like on a mobile phone to see how they do things, too  :omg:
Logged

the end of an era, one starts anew
candycanearter07
Sr. Member ⚓︎
****


i like slimes

⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: candycanearter
Itch.io: My Games

View Profile WWW

Suck At Something September - Did It!uh oh! a pigeon got in!Artsy Candy CaneJoined 2024!
« Reply #2 on: August 02, 2024 @209.19 »

Hi! You can make your site appear differently in different sizes by adding a rule like this to your css:

Code
@media (max-width : 1920px){
}

... and changing the pixel amount to whatever size you like! For example, on my site I have all of my desktop specifications inside a 1920px rule, and all of my mobile specifications inside a 750px rule.

Just put all your selectors that you want to differ between sizes under each rule, and change the properties accordindly. For example, on my site I have this code:

Code
@media (max-width : 1920px){
  #navigation {
    display: block;
  }
  #mobilenav{
    display: none;
  }
}

@media (max-width:750px) {
  #navigation {
    display: none;
    }
  #mobilenav {
    display: block flex;
    }
}

My navigation bar is in a vertical format in desktop, and a horizontal format in mobile, so I have the vertical one set to appear and the smaller one to disappear on larger displays - and vice versa.

Some other things that are helpful to have change between display sizes: box width, text size, the % of space an image takes up, and so on. It's helpful to check out sites you like on a mobile phone to see how they do things, too  :omg:

thanks! i made some updates to the site using max-width restrictors if you want to use devtools to test it ^^
Logged

new to oldnet be nice




Pages: [1] Print 
« previous next »
 

Vaguely similar topics! (3)

What's your favourite mobile game?

Started by NeonriserBoard ♖ ∙ Video Games

Replies: 44
Views: 6930
Last post October 18, 2024 @933.39
by foxkehfan2328
Best way to have a 2 column site?

Started by ObspogonBoard ☔︎ ∙ I need Help!

Replies: 3
Views: 2430
Last post February 13, 2023 @208.53
by fLaMEd
How do you prefer to keep your site organized (or not)

Started by NightdriftBoard ✁ ∙ Web Crafting

Replies: 30
Views: 8827
Last post August 02, 2024 @153.99
by candycanearter07

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi