Creating CSS3 Circles connected by lines

You can achieve this effect with no additional markup using pseudo-elements and the adjacent sibling selector (~): li { width: 2em; height: 2em; text-align: center; line-height: 2em; border-radius: 1em; background: dodgerblue; margin: 0 1em; display: inline-block; color: white; position: relative; } li::before{ content: ”; position: absolute; top: .9em; left: -4em; width: 4em; height: .2em; background: … Read more

CSS non-wrapping floating divs

Use display: inline-block instead of floatand give the container white-space: nowrap. div#sub > div#ranking { position:relative; top:42px; left:7px; width:722px; height:125px; overflow-x:auto; overflow-y:hidden; white-space: nowrap; } div#sub > div#ranking > div.player { display: inline-block; width:67px; height:120px; margin-left:5px; background-color:#f3e1bb; } Here an example: http://jsfiddle.net/D5hUu/3/

Div side by side without float

The usual method when not using floats is to use display: inline-block: http://www.jsfiddle.net/zygnz/1/ .container div { display: inline-block; } Do note its limitations though: There is a additional space after the first bloc – this is because the two blocks are now essentially inline elements, like a and em, so whitespace between the two counts. … Read more

Floating Div Over An Image

Never fails, once I post the question to SO, I get some enlightening “aha” moment and figure it out. The solution: .container { border: 1px solid #DDDDDD; width: 200px; height: 200px; position: relative; } .tag { float: left; position: absolute; left: 0px; top: 0px; z-index: 1000; background-color: #92AD40; padding: 5px; color: #FFFFFF; font-weight: bold; } … Read more

margin-top not working with clear: both

You could put the two floated divs into another one that’s got “overflow: hidden” set: <div style=”overflow:hidden”> <div style=”float: left;”>Left</div> <div style=”float: right;”>Right</div> </div> <div style=”clear: both; margin-top: 200px;”>Main Data</div> edit — To add a bit to this 5-year-old answer: I think the cause of the confusing behavior is the somewhat complicated process of margin … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)