During styling you often need to find some element on the screen and see what space it occupies. What do you usually do?

Experience Level: Junior
Tags: CSS

Answer

  • You can use developer tools (F12) and inspect specifict element.
  • You can e.g. in css give the elements border, color, margins, paddaings...  then you can see how much space each element occupies.
Example
#main-cointeiner {
    border:solid 2px red;
    background-color:#2ea920;
    margin: 4px 2px 5px 8px;
    padding: 3px 2px 1px 2px;
}

Comments

No Comments Yet.
Be the first to tell us what you think.
CSS for beginners
CSS for beginners

Are you learning CSS ? Try our test we designed to help you progress faster.

Test yourself

Chat

Oh, the operator is not available. Leave us your comments. We will answer all your questions as soon as possible.

Comments

Anonymous
Καλησπέρα.
Anonymous
the infinteis -3/15 so 1triition / infinet
Anonymous
e
Anonymous
<a href="https://inspirum.pl "
Anonymous
[url]https://inspirum.pl[/url]
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e