| Author |
table cells not aligning
|
Kim Kantola
Ranch Hand
Joined: May 17, 2001
Posts: 274
|
|
Hi yall, I have an interesting problem. I have a html file with some example data, what i am aiming for is a table that has two td cells. Each cell will have another table. I want both of the two tables to be shown as the same height, even in one may have less rows than the other (its rows should 'stretch' vertically so the tables line up evenly. Here is the html : This code provides the desired results. Here is my problem though! I have some styles I need for some items in my html that when added, 'break' this effect I am seeing. Here is the altered HTML that DOESN'T work : I am kind of lost on why this is breaking, I got the styles from a graphics person who was changing the look-and-feel of the web app. Thanks if this is something obvious to someone!!! Kim
|
 |
Dan Drillich
Ranch Hand
Joined: Jul 09, 2001
Posts: 1126
|
|
By having the DOCTYPE declaration, the page gets 'broken'. [ October 15, 2007: Message edited by: Dan Drillich ]
|
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56528
|
|
Adding a DOCTYPE doesn't "break" anything; it switches the browser out of quirks mode into standards mode. The way various CSS rules are applied will be different, but neither one can be considered "broken". [ October 15, 2007: Message edited by: Bear Bibeault ]
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Kim Kantola
Ranch Hand
Joined: May 17, 2001
Posts: 274
|
|
Wow, thank you so much. I removed that line and viola! Fixed. Now just have to go ask the graphic guy why he put it there in the first place . . . Thanks Again!!!
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56528
|
|
|
Probably to fix other issues which could be re-introduced by removing the DOCTYPE. It really depends upon what conventions are set up for your app. Some shops like to use all quirks mode pages, and some standards-mode pages. You really ought to settle as a group on which one to use and make sure all pages render correctly. Simply adding or removing the DOCTYPE willy-nilly is guaranteed to be a recipe for disaster.
|
 |
Kim Kantola
Ranch Hand
Joined: May 17, 2001
Posts: 274
|
|
Dang, I liked 'willy-nilly' but alas you were right. My removing that line broke other things on the page. This is a tricky situation because we have three differant people working on the same jsp, oy! Looks like time for me to start reading up on xhtml . . . Thanks again for all the help.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56528
|
|
|
quirksmode.org is a good resource.
|
 |
 |
|
|
subject: table cells not aligning
|
|
|