What's new
  • When posting, please be aware that artistic nudity is still nudity and not allowed under RpNation rules. Please edit your pictures accordingly!

Help Ignore Width

Dutch

Ta Reine
I have a width:45% because I like it best on PC. But I need that width:45% to be ignored on mobile is there some code I can write / put in tha will instruct mobile to ignore width and default?
 

Fyuri

ᴍᴏɴᴀᴄʜᴏᴘsɪs
Administrator
Supporter
I have a width:45% because I like it best on PC. But I need that width:45% to be ignored on mobile is there some code I can write / put in tha will instruct mobile to ignore width and default?
Percentage based no. The way you can do this is min-max px width.

max-width:500px;
min-width:300px;

Percentage will always be a static percentage based on what you set it as. You can also min-max with percentage as well, but the issue is if you set it to max of 45% it'll persist at that in mobile as well which I why I suggest the static px method.
 

Dutch

Ta Reine
Ahhh damn and I really hate going pixels. I know it sizes better as pixels on mobile which is why I use it, but 45% is still a tad narrow on my phone. Hmmmmmm
 

Alteras

The Sleepy One
Moderator
Supporter
you can do something like this:
Code:
width: 45%; min-width: 300px;
which is usually good for all mobile devices and desktops and what I tend to do.

If you're familiar with classes, you can use the media queries system we have. [class name=NAME maxWidth=length]
 

Idea

The Pun Tyrant The Gif Hydra
Helper
I usually use tabs to create a separate code for PC and phone. Phone users can thus switch to the phone code at their leisure. Alternatively or in addition, I usually also have a semi-coded version with only simplified code which always works on any device.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top