css3 Icon Logo
me@grafxflow

Written by me@grafxflow

29 Nov, 2012

0

1,852

Fix html table width with CSS

Sometimes when outputting data in a table based layout you may find the size and width differ depending on the content, so to fix the tables and all the inner columns width use the below CSS.

I had this issue when creating a shopping website and when going between different pages made the table change width randomly even though I had set the widths with css.

table {
    table-layout:fixed;
}

Add comment

Smart Search

132 Following
50 Followers

me@grafxflow

Hull, United Kingdom

I am a Full-stack Developer who also started delving into the world of UX/UI Design a few years back. I blog and tweet to hopefully share a little bit of knowledge that can help others around the web. Thanks for stopping by!

Follow