CSS display: block NOT WORK

Status
Not open for further replies.

Koala

New Member
May 23, 2017
22
2
hi. am make a website.
when i try
HTML:
<html>
    <head>
        <title>bestest website europe union</title>
    </head>
    <body>
        <div style="display: block;">
            
        </div>
    </body>
</html>

it do not display a block, but a blank am doing somethin wrongsly?
 
Solution
display: block; makes the div in document visible, if you need a shape you'll need:
CSS:
height:200px;
width:200px;
background: #000;
border-radius: 50%; /* for a circle, if you want a square you can remove this line.*/
If you want to learn css and html,here you go:

Berk

berkibap#4233
Developer
Oct 17, 2015
863
190
display: block; makes the div in document visible, if you need a shape you'll need:
CSS:
height:200px;
width:200px;
background: #000;
border-radius: 50%; /* for a circle, if you want a square you can remove this line.*/
If you want to learn css and html,here you go:
 
Solution

Koala

New Member
May 23, 2017
22
2
display: block; makes the div in document visible, if you need a shape you'll need:
CSS:
height:200px;
width:200px;
background: #000;
border-radius: 50%; /* for a circle, if you want a square you can remove this line.*/
If you want to learn css and html,here you go:
I am not entirely sure how to react to this.
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,637
2,389
I am not entirely sure how to react to this.
Basically display: block; doesn’t give you a block shape (ie a square). It tells the browser to visibly display whatever is inside the tags. Look up some articles on W3Schools

So as @Berk says, you need to apply the code he’s posted to a class and give the div that class name. You don’t need to set display: block; on it as divs are block elements by default.
 
Status
Not open for further replies.

Users who are viewing this thread

Top