Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Positioning

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #183687
    pvl123
    Participant

    Hello, how can I place #nahled and #tnadpis inline? I gues that float could help, but it not works.

    http://codepen.io/anon/pen/jtuco

    #183703
    __
    Participant

    Sounds like you’re looking for inline-block.

    pen

    #183705
    pvl123
    Participant

    Oh, thanks! But how can I positioning those elements? Id like to have that text at the top line of image. margin or padding not works, why?

    #183715
    __
    Participant

    Don’t use positioning (this is not what it is for): adjust the vertical alignment. The default for inline-block is baseline. Try top (or maybe a percentage or length if you want finer control).

    #183729
    pvl123
    Participant

    Wow, thanks. But why float dont works? I set something like this:
    #first – float: left; width; 100px
    #second – float: left; width: 200px

    I thought thath in that case two divs will be abreast.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.