Jukka K. Korpela wrote:
"André Hänsel" <an***@webkr.de> wrote:
When I put a table into a table and try to align it right, it works
in IE but not in Firefox.
Usually when people describe a problem that way, it's in reality
Firefox that gets things right and IE wrong.
Yes, of course me and IE were wrong, that's why I asked how to do it right.
:)
The text-align property affects, by CSS specifications, the alignment
of text lines inside the element. The inner table is a block element,
so it is not affected. The text-align property is inherited into the
inner td so the line ultimately gets aligned to the right, but only
within its container, the cell, and the width of the container is
here just as much as needed for it. IE, as so often, gets this wrong.
By the way, so I got a nice description of my problem. ;)
How do I align it right "rightly". ;)
Using float: right as suggested by Els would be the technically
appropriate way, but what are you really trying to accomplish? It
seems that you are using tables for layout - nested tables are
_mostly_ an indication of that. Then you might just as well use
<table align="right"> for the inner table. Alternatively, you could
try and implement the layout in CSS instead of a mixed approach.
Yes, I'm using a table for layout... still an old vice. It's just one for
the overall layout of the page, but...
....probably I can also avoid even that.
I have one logo in the upper left corner, a box with a login form in the
upper right corner, the content in the middle and a footer line at the
bottom.
How does a correct CSS for that look like? Link?