![css table does not inherit font size css table does not inherit font size](https://community.retool.com/uploads/default/original/1X/21780f8ff2b3db35b939c9ca68017dae0ed2af95.png)
![css table does not inherit font size css table does not inherit font size](https://images.squarespace-cdn.com/content/v1/61c52facce27b870a384b209/1640313263311-JL7R8U2M9US93UFDLLZB/table-generator-html-css.jpg)
Internet Explorer is much more forgiving. So if you set the HEIGHT and WIDTH properties for a DIV and then insert images or text that takes up more space, the display will be a jumbled mess. Mozilla, Netscape, and Opera browsers interpret these values as the exact measurements and don't allow a DIV's HEIGHT or WIDTH values to extend beyond what you specify. Like so many annoying design issues, the basic problem is not with the CSS rules themselves, but how browsers choose to interpret them. Make a note of this: Table cells stretch to fit the content placed inside them, but DIVs may not! If you understand this issue, you'll save yourself a lot of frustrated debugging time. However, there is one big difference in behavior. It makes sense: both DIVs and tables can be nested, have HEIGHT and WIDTH attributes set, contain borders, etc. This seems like the ideal candidate for transition from a table-based layout to a CSS layout. One contains the navigation menu and the other contains page content. Unfortunately, as layouts become more complex, browser compatibility problems increase.Ĭompatibility Problems With HEIGHT And WIDTHĬonsider one of the simplest layouts around: two columns placed side-by-side. Formatting instructions (font family, color, border, etc.)ĭesigners use the DIV to create complex page layouts without using tables.Originally meant as a simple tool to group page elements, the DIV tag gives designers additional flexibility and control over layout when it's combined with Cascading Style Sheet (CSS) properties. Search MS Office A-Z | Search Web Pages/ Design A-Z CSS- Div- Be Careful When You Size Your Divs Home CSS Div Be Careful When You Size Your Divs