When to use CSS positioning?

前端 未结 4 1336
伪装坚强ぢ
伪装坚强ぢ 2020-12-03 11:47

I am new to the world of coding, XHTML, CSS as well as PHP. I have come across numerous tutorials regarding positioning i.e. relative, absolute and fixed however have no ide

4条回答
  •  离开以前
    2020-12-03 12:22

    Two that I frequently use are:

    Relative positioning: helps you style elements relative to other elements. E.g. you want to move an input to the right relative to the div it's inside.

    Fixed positioning: great for things like Refresh suggestions that get 'fixed' so that they follow you wherever you scroll.

    It's best to play around with them and see for yourself.

提交回复
热议问题