0

Why does column widths are ignored here?

http://jsfiddle.net/dimskraft/M4Hn5/

<table class="menu"> <colgroup> <col style="width:50%"/> <col style="width:50%"/> </colgroup> <tr> <td>ORION</td> <td> <table> <tr> <td>Home</td> <td>About</td> <td>Subscribe</td> </tr> </table> </td> </tr> </table> 

CSS

body { font-family: Arial, Helvetica, serif; color: darkgray; background-color: gray; font-size: 12px; } h1 { color: black; font-size: 14px; } table { width: 900px; } table.menu td { height: 100px; background-color: white; } 

1 Answer 1

1

In your CSS, you have table { width: 900px; }, but then in a TD you have an embedded table. This table is also being set to 900px, which is stretching its parent TD to be the entire width of the .menu table. Change that part of the CSS to table.menu { width: 900px; }

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.