Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with switching from XHTML Transitional to Strict 3

Status
Not open for further replies.

Stormheart

Programmer
Feb 7, 2008
17
HU
Hi!

This is my first post here. I always learned and did HTML by my own, have never ever learned it in school... Now I am working with PHP and mostly XHTML Transitional.
I decided some time ago that I create my new website in Strict. But it seems, some things that were simple and usable in Transitional, are totally twisted, unusable and uber-complicated in Strict!
Sometimes I think that W3C gone too far... but nevermind...

What makes this hard is that there is absolutely no help or information about this problems in XHTML tutorials or references - or at least I didn't find.


So my simple, but heavy problems are:

- Positioning tables and other lements to the center, both vertically and horizontally.
It seems to me that Strict tries to prevent me to center anything. :p Even in Transitional, the only way I found to center a table is <div align="center"> ...

- Table falling into pieces.
I've created a table (it contains parts of an image, as two parts are rollovers) and with Transitional header it works perfectly. As soon as I change the header to Strict, it falls into pieces... Under every image part (jpeg file), there will be apr. 5 pixel of SPACE. I tried all the CSS formatting I know, without any result. The W3C validitor says it is valid Strict... If I change the header back to Trans. everything works again.

- <map> problem.
In the w3schools XHTML ref. the example for <map> tag shows that the tag stands alone in the BODY. But the validitor says that it MUST be inside DIV, P, or some other tags... What the hell is that then? Why should I put something into DIV or P, what is NOT a visible element itself?


So far these are the greatest problems that are sometimes make me postal.... I hope you can help me.


Ps.: If you would say use DIVs and no TABLEs than I would say that I have no even the slightest idea about 1, How to replace a complicate table with divs 2, Why the hell TABLE is soooo bad? I didn't found anything on the waht would answer these two questions, so far. Yes, Google is my friend but he didn't help in this...
 
Change the display property of images to block ([tt]display: block;[/tt]). That will get rid of the gaps.

I would still not use image slicing, tables or divs for this. I would use one large image with small image rollovers.

___________________________________________________________
[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Wow, sometimes I really wish I checked the forum on the weekends. I always miss out on such fun posts.

Stormheart, I'll leave you with one last bit of advice before I abandon this thread. Coding with a strict doctype is not for you. Any advice about table-less layouts is obviously falling on deaf ears. You shoot back with heated responses when anybody mentions abandoning that archaic technique. If that's what you wanna do, nobody can stop you. But, you should probably ask yourself this question: What good does it do you to ask for help and then criticize the answers you get, especially when the answers are coming from people that obviously know much more about the subject than you do? It does nothing but get you angry, and waste our time.

I hope you find what you're looking for.

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson

[small]<P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B>[/small]
 
Vragabond:
Thank you! Now it works perfectly. At least you were able to simply answer a question, if the others not...

Now it works perfectly, so I can code it in Strict and with divs now. About sliced images, I looked after the other methods. And some days ago I planned the new sturcture (PHP, XHTML Strict, divs, and AJAX).

But for example, image maps, I still find unreplacable - the reason is simple, I will need complex shapes, and simple rectangulars are not proper.


kath:
Thank you for your kindness and helpfulness... you know, if I wereGod, I would know EVERYTHING! But, I am not. This is why I ask questions.

But unfortunately, I have a great fault: I used to that if I ask a question, people answer them, and do not start speaking about something else. All in all, from thsi whole thread, only some lines were answers to what I asked.

If I ask what color the sky has, why people start to explain why the grass is green???

"Coding with a strict doctype is not for you."
- What is not for me, is people who are unable to answer my questions.

"Any advice about table-less layouts is obviously falling on deaf ears."
- I told you that don't know how to use DIVs, and asked about it. But got no usable answer. I am always ready to switch to the newer fashion, but only if I understand it. Why should I use something I don't understand??? This is why I try to UNDERSTAND first.

"What good does it do you to ask for help and then criticize the answers you get, especially when the answers are coming from people that obviously know much more about the subject than you do?"
You know more about DIVs, I never argued with this. But when I asked you how to use them you were totally unable to give me a practical answer. I do not care about your knowledge if you don't want to share it.


If you think it over again maybe you recignise that I only stated that I have no other choise than use the old, if nobody is able to answer properly the question ITSELF.


So... This is just OFFtopic now, and I don't want to argue, only told my answer to your opinion. So I stop this now. Also, I am absolutely not angry, I just disappointed in some people, thats all.
Have a nice day!
 
What do you mean? I started my post with a "thank you" for you. ;)
 
At the bottom of each posting, there is a link that says Thank XXX for this valuable post. Find the one from Vragabond that helped you and click on the link at the bottom, then on the link in that window to confirm you want to thank him.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top