• CSS shmichael.com

    There are many reasons CSS sucks, but here are the main two:

    CSS relies on hierarchy for positioning, visibility & property inheritance. Therefore, it cannot be separated from the markup & interaction like some HTML purists suggest.
    When positioning elements, one of two options can be used:
    In the flow, which means automatic height & collection of inline assets into blocks, but very hard to tweak the default decisions.
    Out of the flow, which more or less forces use of fixed dimensions for anything positioned this way.

    If you still think CSS is awesome, try this: In a large text box, position a fixed-dimension image at the bottom-right, such that text will wrap around it.

    I hope to further look into the workings of CSS in future posts

Replies (7)

  • @justonemore,
    In a large text box, position a fixed-dimension image at the bottom-right, such that text will wrap around it

    А что в этом сложного? Кладёшь картинку в параграф с текстом и задаёшь ей float: right. Isn't?
  • @ambi, float выравнивает по верхней границе параграфа. А надо по нижней.
  • @killy, Что значит "по нижней"? Находишь место, где текст слева будет точно до нижнего края картинки доходить и вставляешь.
  • @ambi, А теперь адаптируй это под разные размеры экрана.
  • @killy, Сомнительно, что на мобильных устройствах потребуется обтекание картинки текстом. Даже если текст заползёт под картинку в какой-то ситуации — я не вижу в этом какой-то беды. И да — веб это не журнальная верстка.
  • @ambi, Вот мне реально нужно такое. И чтоб не заползало. Для веба а не журнальной вёрстки.
  • @killy, Только не для картинки а для дива.