PDA

View Full Version : specifying Height and width for inline div



wishiwasageek
08-31-2005, 07:39 AM
Ok, mIke mentioned it once I think but I can't find the reference:

-you can't specify height and/or width? for an inline div?

is this correct?

Thanx stax

mwinter
08-31-2005, 01:45 PM
Ok, mIke mentioned it once I think but I can't find the reference:

-you can't specify height and/or width? for an inline div?I've mentioned it in a couple of threads, but I don't think I've written it in direct response to one of your posts (which is why you might not have found anything).


is this correct?Yes, it is. To be more precise, you cannot set the height or width of non-replaced, in-line elements.

Replaced elements are those that tend to have intrinsic dimensions: images and form controls (including object elements). Their size isn't affected by things around them, but by what they are. Thus, non-replaced elements are everything else.

In-line (or text-level) elements are those like links, and phrase elements (strong, em, cite, etc). In this instance, they are also block-level elements that are rendered in-line due to a display: inline CSS declaration.

Hope that helps,
Mike