Subscriber only lesson.
Sign up to this course to view this lesson.
It is possible to change a block element to an inline element and an inline element to a block element with CSS with the display property.
When to use
Whenever you want to change a block to an inline or vice versa.
To change a block/inline element, use the display property:
Hints & tips
- Change a block to inline with display: inline;
- Change inline to block with discplay: block;
- An inline element takes up just the space immediately around it.
- A block element takes up the whole width of the row it sits on.
Lesson notes are only available for subscribers.