/    Sign up×
Community /Pin to ProfileBookmark

obtaining client resolution

Hi

I am trying to fit my page content based on the client resolution.
Is it possbile to retrieve that information in PHP? and if so how?

thanks in advance

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@WebfreakMar 30.2004 — Php can't do that. But javascript can do. You can check out [URL=http://javascript.internet.com/user-details/style-sheets-by-resolution.html]javascript source[/URL], if you're using css styles. But it works only in IE.:mad: Simple script to detect user resolution.
Copy linkTweet thisAlerts:
@DaiWelshApr 01.2004 — The above is true, though you could theoretically grab this value in javascript and then pass it back to the server for use by PHP later.

Generally though, for various reasons (e.g. whether they maximise their browser window or not, are they actually using a visual browser), you will have much more joy using 'liquid' design i.e. tables or css styles that resize to the full width of the browser window. This should work consistently for all browsers whereas fixing the width will at best work for some browsers.
×

Success!

Help @davidklonski 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 6.16,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...