Loading ...
Sorry, an error occurred while loading the content.

7344Re: [NH] Position Image Using CSS

Expand Messages
  • Marcelo Bastos
    Nov 21, 2013
    • 0 Attachment
      Interviewed by CNN on 21/11/2013 16:40, Axel Berger told the world:
      > Margaret Peloquin wrote:
      >> You can float anything provided it is in a <div>
      > DON'T! NEVER even contemplate it. HTML is designed to be sematic
      > language from the ground up. HTML tags tell *what something is*, not how
      > it looks. The look is determined by the reader and his browser. You and
      > your CSS can make suggestions and the reader may take you up on them if
      > he wants. <DIV> is a fallback for rare cases where nothing else fits the
      > bill, using it for visual design is misuse. HTML was designed by a
      > physicist not by an advertisement agency and how long it has more or
      > less survived thei concerted onslaught is proof how valubale that was.
      >
      >
      I wouldn't say it in so strong terms. Sure, you shouldn't wrap something
      in a <div> just for the hell of it; if there's a single block-level
      element inside it, why not applying the style directly to the object?
      And sure, if there's a semantically more appropriate element for that
      role, you should use it instead of <div>. But lots of times, <div> is a
      good option. It defines a distinctive block of the document (like, say,
      an image and its caption) so styles can be applied to it. Sure, I prefer
      using <figure> for images, because it's semantically loaded; but as it
      has been pointed out to me, <figure> is not compatible with IE<=8 and
      some other older browsers. So, if one is aiming for legacy
      compatibility, one has to make do with whatever HTML 4 offers. That
      means either using <div>, or using a table (which also has its share of
      pitfalls), or abusing some other element, like <blockquote>. Myself, I
      prefer using <div> in these cases.

      Yeah, <div> is semantically null... but I think it's still better saying
      nothing about the content than using the *wrong* semantically-loaded
      element. An illustration with attending caption is neither a table as
      generally understood in the physical world, nor a quoted block, nor a
      list of anything. The <div> says only that "this is a distinctive
      sub-unit of the document." And that's actually more accurate for a
      captioned image than saying "this is a table" or "this is a quoted insert."

      Back when HTML5 was pretty new, I used to define classes for <div> and
      <span> based on the names of the new elements... partly so I got used to
      the concepts, and partly to make it easy to eventually overhaul it to
      HTML5, if and when there was a good reason to do it. So, for instance,
      an image with caption would be contained in a <div class="figure">. The
      caption itself would be a <p class="figcaption">

      --
      MCBastos

      This message has been protected with the 2ROT13 algorithm. Unauthorized use will be prosecuted under the DMCA.
      -=-=-
      ... Sent from my legal pad.
      * Added by TagZilla 0.7a1 running on Seamonkey 2.22 *
      Get it at http://xsidebar.mozdev.org/modifiedmailnews.html#tagzilla
    • Show all 26 messages in this topic