If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Percentage and Pixel in website

Now a days there are different devices are available at different screen sizes,

which is best method we can use pixel or percentage for websites ?

If it is pixel as screen size we use pixel as font size
if it is percentage as screen size we use em as font size/or pt is good ? then line-height, margin, and padding can be set to which one ?

You will know the truth, and the truth will set you free (John 8:32)(The truth is about the only begotten son of GOD.....When you feel you are alone for facing your problems, God will never leave you by your own You are important for God

Ems perform best with scalability on mobile devices so are generally better for responsive design.

It comes down to personal preference, but nowadays I generally like to use (r)ems for font-size, line-height, margins and paddings and %/px for layout (% for responsive columns/floats and px for overall max-width limits).

while using rem, we need to code it in pixel also for supporting other old browsers, if we are using rem as font-size and using pixel with it is a complicated thing i mean because we are avoiding pixel while the screen size is taken in percentage, then adding pixel in percentage is not at all incompatible.

if it is only in em it support all browsers, doesn't need additional coding in pixel..
also putting font size in px and font size in rem both will increases the size of style sheet comparing with using em, because we are not using px with em

You will know the truth, and the truth will set you free (John 8:32)(The truth is about the only begotten son of GOD.....When you feel you are alone for facing your problems, God will never leave you by your own You are important for God

Like I said, its personal preference so do what you feel most comfortable with. A few extra declarations for older browsers, namely IE 8 and under, isn't going to be that expensive in the grand scheme of things. Support: http://caniuse.com/rem

It sounds like you've already made your decision (as I have), which is good. I believe that's drawn the thread to a convenient close and the linked resources will be useful to anyone else who is curious to research the topic of responsive design too.