Google+ logo Twitter logo Youtube logo



In CSS we can specify dimensions with a couple of CSS properties. We're going to style a couple of DIV's (blocks) with CSS.

just a yellow block
just a yellow block
just a yellow block

In the example above we can see that we created 3 yellow blocks. (div's) With CSS properties width and height we're able to specify the dimensions of these "blocks".

With the CSS property border we're able to provide the "block" with a border. Here's a list with some CSS properties;
Property Possible value(s) Explanation
width examples: 100px, 200px, 382px Width in pixels
height examples: 100px, 200px, 382px Height in pixels
border example: solid 1px black
solid: stands for massive/solid (can also be dotted or dashed)
1px: the thickness of the border
black: the border-color

Leave a comment ...

Name (will be visible)
E-mailaddress (will not be shown)
Type the code illustrated below

Back to top