Pain Posted February 7, 2012 Share Posted February 7, 2012 Hi guys. I want to position three divs with css, but i just can't do it, nothing is working for me. What i want to achieve is (red squares): http://imageshack.us/f/526/csspositioning.jpg/ Thanks for any help:) Quote Link to comment https://forums.phpfreaks.com/topic/256616-css-positioning-help/ Share on other sites More sharing options...
spiderwell Posted February 7, 2012 Share Posted February 7, 2012 what have you got so far? are they going to change in size? Quote Link to comment https://forums.phpfreaks.com/topic/256616-css-positioning-help/#findComment-1315618 Share on other sites More sharing options...
floridaflatlander Posted February 8, 2012 Share Posted February 8, 2012 I'd guess set a width & height(don't forget if they're blank) for the div and float left, then add magin & padding as needed. Play with it. Quote Link to comment https://forums.phpfreaks.com/topic/256616-css-positioning-help/#findComment-1315624 Share on other sites More sharing options...
Stooney Posted February 8, 2012 Share Posted February 8, 2012 2 options. option 1) So you've got div1, div2, div3. In that order, left to right. Float div1 left, set a left margin on div2 to dodge div1, float div 3 right. Adjust margins accordingly to place the elements where you want them. option 2) give all 3 divs a class, such as 'inlineDiv'. Now define that class with 'display: inline;'. Now any divs with that class will not create line breaks. This is less adjustable for positioning that the first option, however. Quote Link to comment https://forums.phpfreaks.com/topic/256616-css-positioning-help/#findComment-1315987 Share on other sites More sharing options...
spiderwell Posted February 9, 2012 Share Posted February 9, 2012 you could just float them all left too Quote Link to comment https://forums.phpfreaks.com/topic/256616-css-positioning-help/#findComment-1316056 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.