/    Sign up×
Community /Pin to ProfileBookmark

index.html redirect to index.php for larger screen sizes

How do I send users with screen sizes more than 700px to index.php from index.html and keep users with screen sizes less than 700px on the index.html ?

to post a comment
HTML

4 Comments(s)

Copy linkTweet thisAlerts:
@deathshadowOct 11.2014 — Why would you? We have something now called "responsive design" -- which mated to an elastic semi-fluid layout means you shouldn't even be THINKING about different markup for different screen sizes.

Rather than sending them to two different files, which is an accessibility train wreck and long term harder to maintain, use CSS3's media queries so that one markup can do two different layouts.

Which is why things like semantic markup, separation of presentation from content, elastic and semi-fluid design and so forth are important, so you aren't fighting an up-hlll battle when you go to make it responsive and have multiple different appearances from one set of markup and content.
Copy linkTweet thisAlerts:
@chrisldahauthorOct 11.2014 — Thank you. You are quite right. I was trying to save a client some money that he spent on an old fashioned website.
Copy linkTweet thisAlerts:
@bsha100Oct 11.2014 — You should be able to still implement a responsive design. You will need to add some classes to the markup, and edit the css for 'conditional' styling based on certain resolutions. The prevailing method today is '320 and up', which means you style from the lowest resolution up, and set breakpoints for certain resolutions ( i.e. for a minimum width of 960px, apply this style). Check out Bootstrap, that's my go-to and is really easy to use.
Copy linkTweet thisAlerts:
@chrisldahauthorOct 11.2014 — Thank you, I have put the problem back to the client. Responsive design is the way to go at present.
×

Success!

Help @chrisldah 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.20,
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,
)...