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.

CSS text

Featured Replies

So, for example what 800px (that is my average page width) in percentages? I have tried to work it out by dividing 145px by the amount of space I have to fill, which is 655px; because the whole resolution for the width is a minimum of 1024 by 768px:

 

The formula is:

Method: (X / Y) * 100 = R

Example: 3 / 26 = 0.11 | 0.11 * 100 = 11%

 

[i also found a formula for text on webinmind.net]

Examples:

* For a 13px text: 13 / 16 = 0.8125 = 81.25%

* For an 18px text: 18 / 16 = 1.125 = 112.5%

 

... I tried the text but, it's a little screwy in IE. (Like we expected any different =D)

 

Enjoy mien fellow interwebbers, this is a beta thing for me too, if you spot an error, jump all over it ^^

Percentages are based on the size of the parent element. If you have a div set to 1000px and want to size a div within it to 800px using percentages, you would need a value of 80%. If the parent element is the body tag, a value of just under 80% (roughly 78%) is needed on 1024x768 monitors and a value of about 60% is needed for 1280x1024 monitors, assuming that the window is full-screened.

 

I'm not sure where you're getting the value 145px from, but if you know this value and want it to remain constant (for example, if it's a side bar) then I'd recommend simply using pixel sizes.

 

Font-sizes work in a similar way, but 100% is the full size of a letter in the parent element, as opposed to the height of the parent element itself. If it's a help, the default size of text in the body tag is 16px and a lot of style sheets start with this rule to re-sze that to 12:

body {font-size: 62.5%;}

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.