I have two definition lists that need to be side by side. I put them in a table, and that works okay, but if the number of entries in the two lists is not the same, the one that is shortest will have it's bottom entry aligned with the bottom entry of the longest list, and there will be some extra spave at the top of the shorter list.
Is there anyway I can align these side-by-side without tables?
not knowing your exact situation, i would say that maybe it's a case of looking at why the two lists need to be aligned with each other, and possibly opting for a different structure in you xhtml that semantically conveys the relationship between the list items of the two lists, rather than attempting to convey the relationship "visually" through positioning...
Thanks for the help! This is actually for a list of baby names. Girls names on the left, boys names on the right. Although I will probably use this in a few other places as well, since it works so well.
What is the reccomended way to do this? I tried it using a div id, and that worked. It also worked using a class. Here is the code I used.
it's a question of semantics, of the logic behind your code. a unique element that is important in your page should have an ID assigned to it. to assign styles to this element now, it doesn't make sense to assign it a class as well.
so, no real technical reason, but more of a reason of "proper semantics"