Blog

29 Nov
2012

css3 Icon Logo

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;
}
Tagged: < css | fixed width | html | table >
Posted in: < PHP and HTML and CSS >
me@grafxflow avatar

me@grafxflow


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!

Visitors also viewed these posts


Add comment

Add comment