CSS CSS Selectors Selectors - Beyond the Basics DRY CSS

Diego Murray
Diego Murray
2,515 Points

I need a quick reminder.

What does this do again?

.example { display: block; }

3 Answers

shaleeneejadoopat
shaleeneejadoopat
5,444 Points

To add to that, you should try to understand the fundamental concepts of what these elements mean/does. Such as the block-level elements, which always starts on a new line and takes up the full width available ,whereas the inline elements does not start a new line and only take up as much width as necessary.

Sean Do
Sean Do
10,029 Points
.example {display: block;}

You're targeting a class called, "example" and giving it a property to displays an element as a block element.

Displays an element as a block element (like < p >)

Example:

p { display: block; }

see the link below and be sure to change the display: inline to display: block; http://www.w3schools.com/cssref/tryit.asp?filename=trycss_display_inline

Diego Murray
Diego Murray
2,515 Points

Thanks Austin, this link helped.