- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hi,
Below is a HTML having a table with four columns and text in each column.
column1
column2
column3
column4
If you see it in any browser, the text is going over the adjacent left columns. But according to the calculation, lets say for the second column (column starts at 119+ 156 = 275px, text starts at 277px), so it should not overlap.
Any clues why this is happening ?
Thanks,
ns.
Any particular reason as to why you are creating an empty table and then creating text elements outside the table whilst trying to absolute positioning them inside the table cells?
Your table cells aren’t actaully 156 pixels wide. The table doesn’t have a width assigned to it, so if you give it a width of 624 pixels, then that should fix it.
There’s a few other things wrong with it (the width of a cell shouldn’t be in “px” but just the number like width="159"
, there’s a load of semicolons everywhere that shouldn’t be there, things like that) but I’m not sure if that would have helped.
Thanks for the replies.
@filipeb, this is not a hand written html. Generated from C++ code, the positions which i get for paragraphs is absolute positions and if I put them inside table, then you know what is going to happen. The next version is going to calculate relative positions and then the paragraphs will come inside tables.
@Senff, Wow!! That did it. This is really cool. You guys are experts.
I don’t see any width given without pixels. This is generated using code, so everything is symmetrical. About lots of semicolons, there are lots of properties for every element, for example border’s and if that information is not present, that is left blank and you are seeing only colons. But yes, that would not have made any difference.
I will apply the fix now. :-)
Thanks guys for the help.