开发者

Creating a calendar control using CSS: How to auto layout events

I'm creating a JavaScript based calendar control, which when showing a single day needs to list any events occuring. I'd like the use the CSS float:left in order to get the browser to automatically layout the events.

I'd like for the events to automatically stack, so that they float to the far left when possible. Then stack as if there is overlap with another event.

However I'm having problems, it currently looks like this:

开发者_StackOverflow中文版

Creating a calendar control using CSS: How to auto layout events

This is the result I want to achieve:

Creating a calendar control using CSS: How to auto layout events

How can I achieve this effect using float?


Have you tried using the "clear:both;" css style attribute to your block with the green element?

Also, you may find that an already created jQuery plugin like FullCalendar could serve your needs.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜