what is the difference between display:block and display:outline? when i run the code i don't see much difference? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 2

what is the difference between display:block and display:outline? when i run the code i don't see much difference?

12th Jul 2016, 1:25 PM
Priyanka Maheswaram
Priyanka Maheswaram - avatar
4 Answers
+ 2
@ Priyanka, there's no display: outline'. I guess you mean 'inline'. 'display: block' displays an element as block element. And 'display: inline' displays an element as an inline element. You must post your code here so we can see what went wrong.
12th Jul 2016, 11:27 PM
ZinC
ZinC - avatar
+ 1
@ Yanka, what you mean is the effect when the background is fixed while the content moves when you scroll up or down. body { background-attachement: fixed; }
12th Jul 2016, 11:17 PM
ZinC
ZinC - avatar
0
when you displays an element in block form all of its contents breaks to display in block format and extends downward as much as it can take while "inline value" do otherwise by making all block contents display in a straight line far as much as it can take
15th Dec 2016, 3:20 PM
Cele Prince
Cele Prince - avatar
- 3
display:block block this element, he doesn't move when the background be movin'
12th Jul 2016, 1:37 PM
Yanka Santos
Yanka Santos - avatar