How to check screen resolution
7 posts
Page 1 of 1
How do I check screen res in HTML because i am making a iPod or iPhone version for a website and I want it to check screen res to determine whether or not it will be mobile
I don't know much about making apps on an iOS device, and you'd most likely haft to use Javascript (or JQuery), or XCode for this.
If you use JavaScript then you can check with screen.width and screen.height.
ok so mandai i basicallly know nothing about HTML
where would i put it in CSS or wherever it goes and if a site is in HTML can i put javascript it in or not?
where would i put it in CSS or wherever it goes and if a site is in HTML can i put javascript it in or not?
Bogoh67 wrote:ok so mandai i basicallly know nothing about HTMLsomewhere in your html file , I would place it between <head><script> and </head></script> I think that would work
where would i put it in CSS or wherever it goes and if a site is in HTML can i put javascript it in or not?
umm where would i find that if my friend has a .webs website hoster
Open your HTML file,
go to the body (<body>)
under it, add a link, and href = "javascript:alert('Your resolution is '+screen.width+' x '+screen.height);"
Example of your HTML file result:
go to the body (<body>)
under it, add a link, and href = "javascript:alert('Your resolution is '+screen.width+' x '+screen.height);"
Example of your HTML file result:
Code: Select all
<html>
<head>
...
</head>
<body>
...
<a href="javascript:alert('Your resolution is '+screen.width+' x '+screen.height);">Screen Resolution</a>
...
</body>
</html>
We shall let the revolution begin.. the revolution for freedom, freedom against censorship. We shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender
7 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023