- This topic is empty.
-
AuthorPosts
-
July 21, 2012 at 12:24 am #38996
writetonsharma
MemberHi,
I have a html, it has a table and some text absolutely positioned. Although, you will find it unusual because the text is placed outside of table. But, ignore that thing because the coordinates are correct and text should be inside the cells. All browsers show it inside the cell except IE, as the rows keep on increasing, the text keep going up. Below is a part of the HTML.
This table has regular oldsquare corners.
Cell 2 Row 1
Cell 3 Row 1
Cell 1 Row 2
Cell 2 Row 2
Cell 2 Row 3 This table has asquare corner defined.
Added another row
added another row
added another row
I am not able to figure out the problem, may be some of the experts here have better idea.
Thanks.July 21, 2012 at 1:01 am #106507amoss
ParticipantJust going to throw this out here before anything.
Are you aware of the extra ;;;You can style a table (less crappy) with css.
https://css-tricks.com/forums/discussion/18633/need-to-make-a-table-but-in-the-least-crappy-way#Item_3July 21, 2012 at 6:37 am #106524writetonsharma
MemberThis is generated from a program and so you see lots of ;;; , but I don’t think this will cause any problems. If you see this in a browser, all the browsers will correctly show the text position except IE. This is strange.
July 21, 2012 at 8:15 am #106527Vermaas
ParticipantI think it won’t improve your code if it’s spit out like this. It not only looks awefull, it is also not valid. Can you give some more information about what you’re trying to achieve?
Like what kind of output does that programma gives? Then we might can come up with a solution..
July 21, 2012 at 10:16 am #106530writetonsharma
MemberSorry guys, but looks like you didn’t even bother to read the problem carefully. You should first understand why something is like “the way it is” before giving comments otherwise in the end one has to feel bad. When someone has a problem in C++ and comes to me, I first see the code, compile it and see what output its giving and what question is asked. After that only, if I have any confusion, I ask questions. I never come straight to “what the mess you have created”.
If you would have given a couple of minutes and had tried to see this in a browser after adding a couple of tags, you would have guessed what the problem is. For your help, I am copying the full HTML below which can demonstrate the problem:
This table has regular oldsquare corners.
Cell 2 Row 1
Cell 3 Row 1
Cell 1 Row 2
Cell 2 Row 2
Cell 2 Row 3 This table has asquare corner defined.
Added another row
added another row
added another row
See this in IE and may be firefox and you will find that they both are not same.
FYI, apart from HTML5 compliant and not having an external CSS, there are no problems with the code. Its a perfectly valid code. You better try to test it on w3.org. Thanks.
July 21, 2012 at 10:57 am #106533Vermaas
ParticipantFirst: sorry we’re not like you. Hopefully you can live with other people…
Second: IE has some problems with the absolute positioning. Especially IE7.
So back to your problem you can’t modify any of this? From top to bottom everything is spit out by the programe? Well if that’s true, I’m not sure you can even beat this problem, because you can’t modify anything.So please don’t act like this, and just give us the information, otherwise we can’t help. And about the last couple of lines you wrote: This is not HTML valid… notice and document aren’t even tags that exist in HTML documents.
July 21, 2012 at 2:56 pm #106543writetonsharma
Memberno wonder you don’t see how wrong it is …
Can you give me a correct HTML for this?sorry man, no can do, I give up …
You didn’t even try once to correct this.IE has some problems with the absolute positioning. Especially IE7.
It cant even render properly in IE9. Please check it.you can’t modify any of this?
I can modify any part of the code but I should have strong reasons for that. If the solution demands that I should change some HTML, I will surely do it.notice and document aren’t even tags that exist in HTML documents ..
I again say, try to first know what something is “the way it is”. Its a proprietary product and I cannot tell you more than this.So please don’t act like this, and just give us the information …
I have given you the full HTML and I have told you the problem too. I am just asking, why this HTML is not looking the same in all the browsers. Isn’t this enough to solve a problem ?I will agree that I may not be knowing more than you guys but just by saying that its wrong doesn’t make it wrong. Try any validator which w3.org suggests and it will validate it 90% or more. Any code which doesn’t look good is not wrong. Thanks for looking at it.
July 21, 2012 at 3:49 pm #106544Senff
ParticipantI’ll be honest here.
I sorta figured out what caused the differences in various browsers (it’s not the text, or the absolute positioning of the elements, but the rendering of the table itself where the inconsistencies are, and the way the borders and padding are being displayed).
However, your attitude doesn’t inspire me to look into it in further detail and get to the bottom of it. If people are trying to point you in the right direction and you say they’re wrong, then that won’t make anyone enthusiastic to help you out.
Having said that: 90% valid code is not 10% invalid code — it’s either valid or invalid. Invalid code often gives unpredictable results. Also, a
sketchyunconventional way of displaying text in table cells (by positioning it on top of the table, instead of IN the table), will give youunconventionalunconventional results in various browsers.Hopefully my ideas point you in the right direction.
July 22, 2012 at 2:08 am #106570writetonsharma
MemberSenff, don’t you think its the arrogance from someone who boast of helping others in the forum ? I Just posted a problem and asked for help. There is no point of telling that the code is a mess or awefull. I just said that try it in a browser and help me. I also said try to validate the code with any validator if you think its invalid. Instead, there is only one thing I am hearing, the code is invalid.
I know what are the problems, like DOCTYPE is not correct, cellspacing should not be used, no table header/footers. That’s all? does this make this code sloppy or invalid ? Or does this make some comment to such an extreme ? There are reasons and there are limitations why someone is doing this and the other person should understand and respect it. I can write the most beautiful and perfectly valid code but I am not writing it by hand.
I admire you for looking at it. You checked it in a browser and instantly knew what the problems are. I also admire you the way you said about the code. If something is wrong there are better way to tell it. I believe in “give respect and take respect” and vice versa. Anyway… I got your point but I have tested that. See the below code, where the paragraphs are inside the tables but still the results are same.
This table has regular oldsquare corners.
Cell 2 Row 1
Cell 3 Row 1
Cell 1 Row 2
Cell 2 Row 2
Cell 2 Row 3 This table has asquare corner defined.
Added another row
added another row
added another row
Any ideas in case you want to help ? FYI, I am working on a next version of the code generator where the paragraphs and other elements will be inside the table tags.
For my other friends, see how much i write here: cplusplus
I write with the name “writetonsharma” and you will see how much humble and respectful my replies are even if the code is full of s***. Thanks.
CAugust 1, 2012 at 12:29 am #107127writetonsharma
MemberFYI … IE applies some styles by default and which was showing the tables differently then rest of the browsers. I reset the styles and it was looking good.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.