CSS width on inline vs block level elements

Below is an example of an inline element - the span - and a block level element - the div. Both been styled with CSS to have a border and a width of 20em (check the source code). As you can see, you can only use CSS to set the width of a block level element. Setting the width of an inline element has no effect.

test span
test div
Last modified: 20/04/06 11:55:08
Go to top

Related Pages

No related pages or links.

Login/out

Login

Forgot Password?
Go to top
Go to top