How to place text in an image at any desired position ?
We encounter many situations in our day to day life where we want to write text over an image at the desired position. In this article, you are going to learn how to write text over an image using the positioning of the elements. Before going to the concept first we need to know about the position of the elements positioning generally means where you want your elements to appear on your website.
There are various options in positioning like static, relative, absolute, sticky etc. So here we will use the position property to place the text in an image.
In this article you will learn about relative and absolute which are required to write text over an image
- Relative positioning: This method is used to give the element position which is relative to the normal position.
- Absolute positioning: In this method the elements are positioned with respect to their positioned ancestor (positioned implies the position of the ancestor is other than static) *as static is the default positioning.