Work with inline elements
Inline elements are situated on one line until there is enough space. Once the space is finished, elements start a new line.
Main points we have to keep in mind when we work with such type of elements:
- They have
display: inline, by default.
- We can not add
heightdefined only with the element content.
- We can set only horizontal (left and right)
Let's take into account this example. Within the
css file, there will be styles that impact the element and those that have no impact.
By default, inline elements have a gap on the right side; in the case of the
img elements, they have a gap at the bottom. This gap is not a
margin. It is just a blank space added by a browser to ensure that all elements will have a distance between each other.
Everything was clear?
Section 3. Chapter 9