Finnegan
Finnegan

Reputation: 187

Should padding/margins be defined as a fixed value or percentages?

I realise this is almost entirely subjective or situational, but at work we are creating a web application - I think that padding should be defined as percentages so it is more responsive for smaller devices, my coworker thinks that the padding should be a fixed value and that only the content should grow with the page.

He gives the example of stash, where the code section resizes with the page, but the side bar remains a fixed size.

Who is right?

Upvotes: 0

Views: 41

Answers (1)

user3003238
user3003238

Reputation: 1515

You've answer your own question: 'I realise this is almost entirely subjective or situational'

Normally we define multiple sets of css to handle PC and phone devices separately. While if your page isn't that complex, using percentag/vw/vh etc instead of px to achieve higher compatibility is also a good idea.

But anyway, it's entirely subjective on your situations

Upvotes: 1

Related Questions