The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Positioning
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
Sounds like you’re looking for inline-block.
inline-block
pen
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?
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).
baseline
top
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.