I don't have a screen right now, but look at:
http://www.elkarte.net/community/index.php?topic=1474.0
with a narrow screen (1024px)
I'd suggest a:
{
display: inline-block;
min-width: 22%;
}
instead of the floatleft.
Question: $attachments_per_line = 4;
Any objection to remove it? O:-)
Does that make the attachments not align horizontally under the post and go back to vertical? If so I'm personally not in favor of that removal.
At the moment there is an hard line (<hr>) every $attachments_per_line and each attachment if floated left, ending up with stuff like in attachment screen_246.
The fix I proposed above, makes the attachments pile up in max 4 per row (due to min-width: 22%;) and if more than that they will start a new row in an ordered fashion (see screen_247, screen_248 and screen_249).
Removing the $attachments_per_line would avoid attachments to be displayed link in screen_250 and screen_251.
https://github.com/emanuele45/Dialogo/compare/fixin
Looks really good to me then ;D