replaced vs non replaced

S

Shawn Modersohn

The CSS2 specification states that a replaced element is an element where
the UA knows only the intrinsic dimensions, such as an image tag.

Section 10.3 lists 8 situations where width is possibly affected by other
variables.

I am trying to gain an understanding of the first four in terms of replaced
vs non replaced and inline vs block.

I understand that an image tag is an example of a non-replaced element. I
would also gather that it is an inline non-replaced element because it
neither forms a new block of content and it is an element that the UA only
knows the intrinsic dimensions.

An inline replaced element might be a strong tag.

A block level non-replaced element would be a div as an example.

But I can't think of where I would see a block level non-replaced element,
at least not an element that is inherently block level. What would be an
example of an element that forms a new block of content and that the UA
knows only the intrinsic dimensions?

Do I understand these contexts correctly?
Thanks.
 
S

Shawn Modersohn

Shawn Modersohn said:
The CSS2 specification states that a replaced element is an element where
the UA knows only the intrinsic dimensions, such as an image tag.

Section 10.3 lists 8 situations where width is possibly affected by other
variables.

I am trying to gain an understanding of the first four in terms of replaced
vs non replaced and inline vs block.

I understand that an image tag is an example of a non-replaced element. I
would also gather that it is an inline non-replaced element because it
neither forms a new block of content and it is an element that the UA only
knows the intrinsic dimensions.

An inline replaced element might be a strong tag.

A block level non-replaced element would be a div as an example.

But I can't think of where I would see a block level non-replaced element,
at least not an element that is inherently block level. What would be an
example of an element that forms a new block of content and that the UA
knows only the intrinsic dimensions?

Do I understand these contexts correctly?
Thanks.
I meant "can't think of where I would see a block level REPLACED element",
not non-replaced.
 
R

rf

Shawn Modersohn wrote
The CSS2 specification states that a replaced element is an element where
the UA knows only the intrinsic dimensions, such as an image tag.

Yep. Or, if you wish you *can* specify the dimensions.
Section 10.3 lists 8 situations where width is possibly affected by other
variables.

I am trying to gain an understanding of the first four in terms of replaced
vs non replaced and inline vs block.

I understand that an image tag is an example of a non-replaced element. I
would also gather that it is an inline non-replaced element because it
neither forms a new block of content and it is an element that the UA only
knows the intrinsic dimensions.

An inline replaced element might be a strong tag.

You actually have this the wrong way round. An image element is a replaced
inline element. A strong element is a non-replaced inline element. Think
like: the image element (consisting only if the opening tag, <img>) is
replaced by the pixels in the image. A strong element is not replaced, its
content (the bit between the opening and closing tag) is rendered.
A block level non-replaced element would be a div as an example.

Yep. That is correct.
But I can't think of where I would see a block level non-replaced element,

You mean a block level replaced element.
at least not an element that is inherently block level. What would be an
example of an element that forms a new block of content and that the UA
knows only the intrinsic dimensions?

Consider a floated image.

The image element is a replaced element. Floating the element causes it to
become block level (as per the second paragraph in section 9.5), so it is
now a block level replaced element.
Do I understand these contexts correctly?

Apart from getting them the wrong way round, I think so :)
 
S

Steve Pugh

Shawn Modersohn said:
The CSS2 specification states that a replaced element is an element where
the UA knows only the intrinsic dimensions, such as an image tag.

Section 10.3 lists 8 situations where width is possibly affected by other
variables.

I am trying to gain an understanding of the first four in terms of replaced
vs non replaced and inline vs block.

I understand that an image tag is an example of a non-replaced element.

No. An image element is a replaced element. Simple typo?
I
would also gather that it is an inline non-replaced element because it
neither forms a new block of content and it is an element that the UA only
knows the intrinsic dimensions.

An inline replaced element might be a strong tag.

No. A strong element is a non-replaced element.
A block level non-replaced element would be a div as an example.
Correct.

But I can't think of where I would see a block level non-replaced element,

I presume you mean replaced here as you've only just given an example
of a non-replaced block.
at least not an element that is inherently block level. What would be an
example of an element that forms a new block of content and that the UA
knows only the intrinsic dimensions?

There aren't any in vanilla HTML 4. But as any element can have
display: block; as a style it's easy to transform <img> or <object>
into a replaced so clearly the spec has to cover that eventuality.

Steve
 
S

Shawn Modersohn

Shawn Modersohn said:
The CSS2 specification states that a replaced element is an element where
the UA knows only the intrinsic dimensions, such as an image tag.

Section 10.3 lists 8 situations where width is possibly affected by other
variables.

I am trying to gain an understanding of the first four in terms of replaced
vs non replaced and inline vs block.

I understand that an image tag is an example of a non-replaced element. I
would also gather that it is an inline non-replaced element because it
neither forms a new block of content and it is an element that the UA only
knows the intrinsic dimensions.

An inline replaced element might be a strong tag.

A block level non-replaced element would be a div as an example.

But I can't think of where I would see a block level non-replaced element,
at least not an element that is inherently block level. What would be an
example of an element that forms a new block of content and that the UA
knows only the intrinsic dimensions?

Do I understand these contexts correctly?
Thanks.

Thanks for the replys.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top