Should I use px or rem value units in my CSS

0 votes

I'm working on a new website, and I'd like it to work with as many browsers and settings as feasible. I'm attempting to figure out what unit of measurement I should use for font and element sizes, but I'm having trouble deciding.

My issue is if I should use px or rem in CSS.

So far, I've discovered that utilising px is incompatible with users who change their browser's default font size.
I've ignored ems because they're more difficult to maintain than rems because they cascade.
Some argue that rems are more desirable because they are resolution independent.

Jun 9, 2022 in CSS by Edureka
• 13,620 points
498 views

1 answer to this question.

0 votes
The answer is yes because using px units precluded the user from resizing the text at all. But, these days, browser zoom is the preferred approach for making everything bigger (including text), and it works wonderfully even when you use px.
answered Jun 21, 2022 by Edureka
• 12,690 points

Related Questions In CSS

0 votes
0 answers

What is the difference between id and class in CSS, and when should I use them?

#main { background: #000; ...READ MORE

Aug 18, 2022 in CSS by Edureka
• 13,620 points
325 views
0 votes
1 answer

How to set Bullet colors in UL/LI html lists via CSS without using any images or span tags

I use jQuery for this: jQuery('li').wrapInner('<span class="li_content" />'); & ...READ MORE

answered May 27, 2022 in CSS by Edureka
• 12,690 points
989 views
0 votes
1 answer

How do I center this form in css?

You can try form { ...READ MORE

answered Jun 10, 2022 in CSS by Edureka
• 12,690 points
638 views
0 votes
1 answer
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
10,386 views
0 votes
1 answer

Using/Handling colon inside a JSF generated HTML element ID in CSS selector

Yes, you can.  Just Backslash (\) the colon.  Like ...READ MORE

answered Nov 14, 2018 in Others by DataKing99
• 8,250 points
2,798 views
0 votes
1 answer

What is a css selector and where is it used?

CSS Selector is a combination of element ...READ MORE

answered Nov 21, 2018 in Data Analytics by Kalgi
• 52,360 points
850 views
0 votes
1 answer

What is the difference between span and div?

The div should be used to wrap sections of ...READ MORE

answered Jan 16, 2020 in Web Development by Niraj

edited Jan 21, 2020 by Niroj 3,515 views
0 votes
1 answer

Setting the value of REM for all the properties in CSS

We've covered this in comments, but essentially ...READ MORE

answered Jun 28, 2022 in CSS by Edureka
• 12,690 points
1,968 views
0 votes
1 answer

How do I give text or an image a transparent background using CSS?

Use either a semi-transparent PNG or SVG ...READ MORE

answered May 27, 2022 in CSS by Edureka
• 12,690 points
583 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP