Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

how many pixels equal to 100% width ?

Featured Replies

Hi,

I set width of body to 100% but I've got some problems with % and that is why I want to change it to pixels. how many pixels equal to 100% ?

is it possible to find out pixels of screen or browser by javascript then dynamically set the width and height ?

 

tnx a lot.

how many pixels equal to 100% ?

 

By definition the amount of pixels is the full width of the browser. If you resize the browser, the pixels with be 100% of the available screen size at that moment.

 

Have a look at this:

 

http://www.w3schools.com/js/js_window.asp

 

or fiddle around with this:

 

 

var w=window.innerWidth

|| document.documentElement.clientWidth

|| document.body.clientWidth;

 

var h=window.innerHeight

|| document.documentElement.clientHeight

|| document.body.clientHeight;

 

 

document.write('The width of the browser is ' + w + 'px <br>');

 

document.write('The height of the browser is ' + h + 'px');

  • Author

javascript has

window.innerWidth

if that's what you want.

 

What's the problem you're encountering using %. Perhaps we can solve that instead of relying on JS.

 

Hello,

visit

 

http://www.webdesignerforum.co.uk/topic/66207-css-problem-with-zooming-inout-the-browser/

 

in this topic I have explained the problem, my problem is in zooming in/out the browser

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.