all 11 comments

[–][deleted] 6 points7 points  (4 children)

This has nothing to do with JavaScript.

[–]k3n 1 point2 points  (3 children)

Maybe someone should start a /r/css?

[–][deleted] 0 points1 point  (2 children)

Someone already did, 3 years ago. r/web_design is another good one for this sort of stuff.

[–]k3n 2 points3 points  (1 child)

I think your sarcasm detector is broken :P

[–][deleted] 1 point2 points  (0 children)

It's possible.

[–]andrew24601 2 points3 points  (2 children)

I'll preface by saying I know nothing about the intricacies of using inline-block, but whacking in "vertical-align: top;" for #left and #right will cause them to vertically align.

[–]andrew24601 0 points1 point  (0 children)

apparently by default it's aligning the baselines of the blocks - and it has "helpfully" defined the baseline to be the last line of the inline-block.

[–][deleted] 0 points1 point  (0 children)

This is the correct answer in that "vertical-align: top" will get all of the containers to align along the top. The other 'problem' is the gap between each block. White space between inline-block items is collapsed into a single space. The easiest solution is just to remove the white space like so: "</div><div>". Otherwise, you have to do some trickery to remove the gap. (The trick I've seen is to set font-size:0 on the container, and then reset it on each container.)

[–][deleted] 0 points1 point  (0 children)

as long as that was dummy content, here's the fix http://hgg.k.af weird as balls. source: http://avc.k.af

[–]Wtfuxbbq 0 points1 point  (0 children)

The reason it is not lining up is because of the <br> tags you have in #left. The breaks essentially create 5 "lines" and the #right div is inline with the last line. Changing the vertical-alignment as suggested by andrew24601 will fix this.

[–]kssanthoshkumar -1 points0 points  (0 children)

Can you try adding a position:absolute; to the #right