html - Vertical cell alignment -


i trying make weekly schedule table div tag. here sample code each day:

<% times.each |time| %>   <% d = worker.working_on_day(date.new(time.year,time.month,time.day).cwday - 1) %>   <div style="height: <%= d.duration.to_i * 4 %>px; ">   ...   </div> <% end %> 

as can see, wanted dynamically adjust height of cell based on duration. heights not align properly. example, cell duration of 30 minutes smaller 2 cells of 15 minutes. how can adjust height align cells properly?

<div style="height: <%= d.duration.to_i * 4 %>px; padding: 0; margin: 0; border: 0;"> 

Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -