/    Sign up×
Community /Pin to ProfileBookmark

How to auto resize for viewers

I designed a website and when it is viewd on a smaller size monitor you have to scroll over to view the rest of the page.

Is there a way to auto resize to fit on the smaller screens using PHP.

Thanks

to post a comment
PHP

8 Comments(s)

Copy linkTweet thisAlerts:
@NogDogMay 19.2005 — No way that I know of.
Copy linkTweet thisAlerts:
@gimpMay 19.2005 — Use JavaScript!

screen.width and screen.height will help you...

[CODE]
<script language='javascript'>
var SCh = screen.height;
var SCw = screen.width;
if ((SCh = 600) && (SCw = 800)) {
//small version
} else {
//big version
}
<script>
[/CODE]


or something to that extent. Very, very simple.
Copy linkTweet thisAlerts:
@cjc1055authorMay 19.2005 — thats the only solution huh? so I have to create another site just smaller?
Copy linkTweet thisAlerts:
@gimpMay 19.2005 — More or less.
Copy linkTweet thisAlerts:
@cjc1055authorMay 19.2005 — Well, that will be my next project then.. Thank you for the help!

Chris
Copy linkTweet thisAlerts:
@NogDogMay 19.2005 — Or, make your design [url=http://www.alistapart.com/articles/elastic/]elastic[/url].
Copy linkTweet thisAlerts:
@cjc1055authorMay 19.2005 — I think that is more what I am looking for. I want the screen to fit perfect on anyones screen that views the page.. I know it can be done. I go to web pages all the time that fits my screen perfect whether i'm at 1280x1024 or 800x600

I need to implement this somehow.. can anyone help me out!

Thanks
Copy linkTweet thisAlerts:
@cjc1055authorMay 19.2005 — Well.. I just decided to use % instead of pixels on just the navbar and the top bar and bottom bar and the rest is fine.. thanks for your help though..
×

Success!

Help @cjc1055 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...