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

    Remember to credit artists when using work not your own.

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?
 
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.
 
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
 
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]
 
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

Back
Top