Why Float And Text-align Behave Different In A Td?
Add a New Document Solution 1:Tables and table cells have a unique formatting structure which, in CSS, is described in an entire section of its own. Attempting to float a table cell will interfere with this structure, as it quite literally causes it to no longer be a table cell — it turns it into a block box instead, causing HTML attributes such as
Browsers following the CSS spec on formatting tables have to follow specific rules on how to handle such cases in order to preserve a relatively sane table structure according to the CSS table formatting model. Specifically, what you see when using Of course, since you're looking to align the text content of your table cell, it only makes sense to use the |
Post a Comment for "Why Float And Text-align Behave Different In A Td?"