davidgol — 2012-08-15T17:46:14-04:00 — #1
Got a really simple question: if I have a 400px wide div, and in in two floating 200px wide divs, why won't they align properly?
<div style="background-color: #000000; width:400px; height:300px; padding:0; margin:0">
* <div style="background-color:#f000aa; padding:0; margin:0; height:100px; width:200px; float:right;"></div>
* <div style="background-color:#f0f0ee; padding:0; margin:0; height:100px; width:200px; float:left;"></div>
you can see they have margin and padding set to 0 so I don't understand what's going on (screenshot attached)
markbrown4 — 2012-08-15T18:01:55-04:00 — #2
They are aligned for me ok, you don't actually have those asterisk' in there do you?
davidgol — 2012-08-15T19:13:12-04:00 — #3
no, no asterisk' those were somehow added during copying and pasting..
well, you code works! why didn't mine
jskintauy — 2012-08-16T06:45:12-04:00 — #4
When I removed the asterisks after copying and pasting, it worked fine so I think they are somehow in your code.
ralphm — 2012-08-16T19:01:35-04:00 — #5
Were you using something like Microsoft Word to generate that code?
system — 2014-10-07T22:48:27-04:00 — #6
This topic is now closed. New replies are no longer allowed.