[css] Table set fixed column width

Background : Using JQuery Datatable generated dynamically table but push columns off the layout.

Example :
Image 1

Solution :
Add table-layout to the css, and of course give width to each column :

table-layout: fixed;

The reason why :
Fixed table layout algorithm:
The horizontal layout only depends on the table’s width and the width of the columns, not the contents of the cells
Allows a browser to lay out the table faster than the automatic table layout
The browser can begin to display the table once the first row has been received

Ref from : w3schools


Drop down menu (jquery+css)

Recently, I worked on with a project which need a drop down menu. I share my code here:

You can find the simple demo here.

HTML (with just simple ul and li) :

​<ul class="your_menu">
		<a href="" title="">MON MENU</a>
			<li><a href="#" title="">Sous menu 1</a></li>
			<li><a href="#" title="">Sous menu 2</a></li>

Jquery (I used version 1.8.3, but it will compatible with older version, just not so old):

$(document).ready(function() {
	// Lorsqu’on entre dans le menu
	$(‘ul.your_menu li’).mouseenter(function() {

	// Lorsqu’on sort du menu
	$(‘ul.your_menu li’).mouseleave(function() {

CSS (the list will display with table-cell, the background will be transparent, and the bottom border will be round):

	display: table;

.your_menu li{

.your_menu li ul{
	list-style-type: none;

.your_menu li ul li{

.your_menu li ul li:last-child{
	-webkit-border-bottom-right-radius: 8px;
	-webkit-border-bottom-left-radius: 8px;
	-moz-border-radius-bottomright: 8px;
	-moz-border-radius-bottomleft: 8px;
	border-bottom-right-radius: 8px;
	border-bottom-left-radius: 8px;