Re: Crippled or missing borders in IE 7



On Mar 19, 11:12 pm, Ben C wrote:
It is the whole point of CSS, but not of HTML. It used to be the whole
point of HTML, but nowadays HTML is not supposed to describe
presentation. So for something to be "inline" or "block" in HTML is
presumably meant to be interpreted in some kind of abstract way (or just
accepted as a bit of an anachronism).

IE and Firefox render differently the example code in the original
posting, even when it is corrected to validate HTML and CSS.

I'm sure you're right. I haven't tested it (I don't have IE) and I don't
know what exactly is causing the difference there.

Block-level, inline, and table-cell elements are not about
presentation,
they are about syntax in HTML.
You cannot have for example <span><div>something</div></span>
you cannot have a block-level element inside an inline element
(div is block-level, span is an inline element).
Well... you can have that, browsers will try to cope with this,
but it makes no sense,
and it might confuse browsers, so
different browsers could display the same code differently, etc.

I was just trying to answer the question which started this thread,
and I think the answer is to treat accordingly
block-level, inline and table-cell elements.
You can see that adding
display:block to the style makes the border
appear as intended in IE as well,
but especially when applied to <span>
it does not fit logically in the syntax,
in the page element tree, not only in the box visual model.

My point is that it is a good idea to follow the simple rule
that is to consider what are the block-level, inline and
table-cell elements in your page and deal with them
as simply and as logically as you can,
because this will make it easier to browsers to
present the page as intended by the author.

Another simple rule, when using tables only for layout,
consider not using tables.

.



Relevant Pages

  • Re: floating ps with addresss in them
    ... "Block-level elements are those elements of the source document that are ... Yes but don't confuse that with the HTML concept of a "block-like ... is an HTML block, but a CSS inline. ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: Crippled or missing borders in IE 7
    ... point of HTML, but nowadays HTML is not supposed to describe ... Block-level, inline, and table-cell elements are not about ... It's talking about the display property. ...
    (alt.html)
  • Re: Span width
    ... Mark Smith pisze: ... but not in the mozilla breed of browsers. ... the following code using img (which is also an inline ...
    (comp.infosystems.www.authoring.stylesheets)
  • Span width
    ... but not in the mozilla breed of browsers. ... elements like span. ... the following code using img (which is also an inline ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: Really basic float right problem cross browser
    ... inline content in before it looks different in every browser. ... all browsers rendered the floated element down a line ... DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// ... surprising that it renders differently in different browsers. ...
    (alt.html)