I have a site that I have a div based layout that seems to work fine in IE and Firefox. I have the same layout on the same site that is using osCommerce, and in IE7, the layout is all messed up, but in FireFox, it appears fine. Could someone tell me why?
Regular site template: www.yuppiepuppygear.com/index_new.php (http://www.yuppiepuppygear.com/index_new.php)
osCommerce site: www.yuppiepuppygear.com/shop/catalog (http://www.yuppiepuppygear.com/shop/catalog)
Thanks!!
Fang
01-27-2009, 01:24 AM
Same layout???
One is with a valid DTD and div layout, the other is invalid DTD and table layout!
jrthor2
01-27-2009, 06:10 AM
sorry, wrong link for the osCommerce site. Here is the correct link:
Add a valid DTD (http://www.w3.org/QA/2002/04/valid-dtd-list.html)
jrthor2
01-27-2009, 07:37 PM
Ok, got the DTD fixed. I have a div that I want to contain the left nav and the content, but they both appear to be outside of my main_shop div. Could you tell me what I'm missing?
Thanks for the help!
Fang
01-28-2009, 02:15 AM
Looks the same in Fx an IE7. Where exactly is the problem?
A html dtd would be more appropriate than a xhtml dtd.
The shopLeftNav and shopRight content is not inside the main_shop div, it appears to be outside of this div.
Thanks!!
Fang
01-28-2009, 06:33 AM
#main_shop {overflow:hidden;}
followthehollow
01-28-2009, 07:07 AM
Looks the same in Fx an IE7. Where exactly is the problem?
A html dtd would be more appropriate than a xhtml dtd.
Fang is correct because of how you designed the page.
If I were you however, I would look more into XHTML, as it was designed to not have half of these issues.
XHTML has been pushed as the industry replacement to HTML for a few years now. Even though it seems more like a syntax thing, most modern browsers understand it better. If you could, try teaching yourself Strict from the start. It creates good habits for the future.
Fang
01-28-2009, 07:46 AM
If I were you however, I would look more into XHTML, as it was designed to not have half of these issues.No, it has more issues if you are not technically competent. Only use xhtml if you are writing XML-based Web documents
XHTML has been pushed as the industry replacement to HTML for a few years now.No, that would be html5.
jrthor2
01-28-2009, 09:16 AM
I completely agree, but this site is using an ecommerce solution called osCommerce, which is over 2 years old, and basically does everything using tables, etc. I've tried to use css where I can, but there is s ton of code in osCommerce.
Thanks for the help Fang, the overflow: hidden worked.
followthehollow
01-28-2009, 10:03 AM
No, it has more issues if you are not technically competent. Only use xhtml if you are writing XML-based Web documents
No, that would be html5.
Ok, maybe I can see how that could have been a matter of opinion.
When I said it has been pushed to replace HTML, I meant that W3C recommends it over HTML for any current browser.
I refer you to the introduction of XHTML by W3C themselves:
http://w3schools.com/xhtml/xhtml_intro.asp
Sorry, not trying to be a prick, but mainstream use of standard HTML is discredited not only by W3C, but also every modern standards-compliant browser. As it is mentioned many times at the URL I linked to, XHTML is a much more comprehensive reformulation of HTML using XML syntax to allow for more parsing options on the browser's part. It is, by W3C's own admission, superior to regular HTML in web design.
http://w3schools.com/xhtml/xhtml_why.asp
Fang
01-28-2009, 10:28 AM
W3Schools is not from W3C, but from Refsnes Data (http://www.w3schools.com/about/about_copyright.asp). A common mistake to assume a connection between the two.
W3Schools has advertising; W3C is non-profit organization.
W3Schools writes invalid code; W3C does not.
W3Schools has accessibility problems; W3C does not.
....
This is the W3C (http://www.w3.org/)
followthehollow
01-28-2009, 10:40 AM
W3Schools is not from W3C, but from Refsnes Data (http://www.w3schools.com/about/about_copyright.asp). A common mistake to assume a connection between the two.
W3Schools has advertising; W3C is non-profit organization.
W3Schools writes invalid code; W3C does not.
W3Schools has accessibility problems; W3C does not.
....
This is the W3C (http://www.w3.org/)
I don't suppose you saw what I was talking about.
I'm not confusing w3schools and w3c, but merely was pointing out using w3schools's website that XHTML is the w3c recommendation.
I couldn't get w3's website to load to look up the documentation. As I write this reply, their site is still timing out for me.
You can argue semantics all day. The point is when you open a program like Dreamweaver, it'll set an XHTML Transitional doctype declaration by default, and many professional-made sites such as Microsoft.com, Intel.com, Amd.com, etc. use XHTML.
There is absolutely no reason, save laziness for learning a new syntax, to use HTML over XHTML.
EDIT: An afterthought: A site having advertising is moot. It doesn't mean their content is invalid or untrue, it just means they don't work off of donations, hopes, and dreams to keep their site going.
As far as the invalid code and accessibility issues, I'll have to take your word for it. To this day, I haven't experienced either with w3schools. W3C's site however, hasn't been loading for me all day.
Fang
01-28-2009, 10:56 AM
XHTML Transitional doctype is an excuse to write sloppy code, especilly when it's sent as text/html.
html & xhtml faq (http://www.w3.org/MarkUp/2004/xhtml-faq)
Why would the W3C be working on html5 (http://dev.w3.org/html5/html4-differences/) if they thought xhtml was better?
followthehollow
01-28-2009, 01:25 PM
XHTML Transitional doctype is an excuse to write sloppy code, especilly when it's sent as text/html.
html & xhtml faq (http://www.w3.org/MarkUp/2004/xhtml-faq)
To this at least, I agree. I've been an advocate of the Strict formatting standard since I've started web design. Transitional is obviously for people who are less concerned about proper structure. That being said, it has its place.
Why would the W3C be working on html5 (http://dev.w3.org/html5/html4-differences/) if they thought xhtml was better?
Because I seriously doubt W3C has pumped out an article called "Why we continue to develop HTML", I'm going to give you my personal take on it. The world of web development is divided into mainly three types of people: those who like to do things the accepted correct way, those who don't care either way or don't want to learn, and those who are still stuck in 1997.
HTML is for the latter two, as it is very forgiving of nesting errors, unclosed tags, and basic syntax issues. XHTML is exactly what it sounds like. It is HTML with an XML twist that basically means if you mess up the code, it won't work. XML is a get it right or don't get it at all type language, and XHTML builds off of that idea to form clean code abiding by a set standard regardless of user preference.
Don't get me wrong, HTML has its place, among the many people who still use the design view in Microsoft Sharepoint. The bottom line is you can't sit every person who wants to build a web site down and force them to relearn what they already know. Now I haven't kept up with HTML5 because quite simply I don't keep up with HTML, but there is a percentage of people out there who love its lack of complexity and would still be trying to use it even if W3C up and said it'll never support it again.
My point still stands however, and XHTML is a fine replacement to HTML on any web page if the creator took the time to learn the rules. Strict is preferable, but even Transitional XHTML has more structure than HTML.
On a lighter note, I think its time we agree to disagree, as I'm sure this will not change your mind. We have strayed far off topic and despite the heated discussion, my original comment was merely a suggestion to the OP to look into other methods of building a web page.
Charles
01-28-2009, 01:43 PM
followthehollow, you seem to be one of those people who have confused the benefits of the strict over the transitional DOCTYPEs with the beneifts of XHTML over HTML. Yes, XHTML is an W3C recmmendation, but so is HTML and so is the Formatting Objects (FO) specification. But you wouldn't use FO for a web page and unless you know what you are doing you shouldn't use XHTML for one either. The problem is that XHTML is incompatable with HTML and HTML browsers. Before you go on about XHTML being nothing more than HTML with stricter requirements, do read http://www.w3.org/TR/xhtml1/#guidelines . That's the appandix to the first XHTMl specification detailling how to change XHTML to make it compatable. With subsequent versions of XHTML they don't tell you how to make it HTML compatable; instead they tell you to not even try, forbidding you from using it with the "text/html" mime type.
To summarize and to go from the best to the worst:
HTML 4.01 Strict works on all web browsers.
XHTML 1.0 Strict violates some HTML rules, the trailling "/" in empty tags has a different meaning in HTML, but if you follow the appendix you might make it work.
HTML 4.01 Transitional is only suitable for graphical browsers.
XHTML 1.0 Transitional is only suitable for graphical browsers and only if you follow that appendix which few read and fewer still follow.
You note from that, HTML comes out on the top and XHTML on the bottom.
followthehollow
01-28-2009, 02:28 PM
followthehollow, you seem to be one of those people who have confused the benefits of the strict over the transitional DOCTYPEs with the beneifts of XHTML over HTML. Yes, XHTML is an W3C recmmendation, but so is HTML and so is the Formatting Objects (FO) specification. But you wouldn't use FO for a web page and unless you know what you are doing you shouldn't use XHTML for one either. The problem is that XHTML is incompatable with HTML and HTML browsers. Before you go on about XHTML being nothing more than HTML with stricter requirements, do read http://www.w3.org/TR/xhtml1/#guidelines . That's the appandix to the first XHTMl specification detailling how to change XHTML to make it compatable. With subsequent versions of XHTML they don't tell you how to make it HTML compatable; instead they tell you to not even try, forbidding you from using it with the "text/html" mime type.
To summarize and to go from the best to the worst:
HTML 4.01 Strict works on all web browsers.
XHTML 1.0 Strict violates some HTML rules, the trailling "/" in empty tags has a different meaning in HTML, but if you follow the appendix you might make it work.
HTML 4.01 Transitional is only suitable for graphical browsers.
XHTML 1.0 Transitional is only suitable for graphical browsers and only if you follow that appendix which few read and fewer still follow.
You note from that, HTML comes out on the top and XHTML on the bottom.
I suppose since you seem well enough informed I can't help but believe you.
It remains the same however, that I seem to be able to write a page in strict or transitional XHTML and it work in just about every mainstream browser, just the same if not better than those who trouble around with HTML.
I guess, being someone who has used XHTML since the start of their time doing web design, I've developed something of a bias, but I see no true disadvantage of creating a website in XHTML assuming it'll have the same effects in popular browsers such as IE and Firefox. Granted, it may not work in a strictly HTML browser, but I can't even think of any off the top of my head, and with maybe the exception of HTML Strict, XHTML usually seems to yield cleaner code. This of course assumes the writer has an understanding of XHTML syntax and follows it.
It certainly is NOT a version of HTML that is to be used when incorporating XML-based applications on a page, as the XHTML code you write to make the page gets considered an XML application, which is kind of the point.
I also never meant to say that XHTML is HTML with stricter requirements. I regard them as two separate platforms, but by its roots with XML, I had assumed XHTML was the cleaner one of the two. On that, I admit defeat.
Thank you Charles for your clarification.
followthehollow
01-28-2009, 09:09 PM
Once again, I'm double posting and I apologize. I have to say though, my not wanting to argue it anymore and my lack of formal knowledge of the subject (I do this as a hobby, not professionally or for money), the few posts made in contention with mine really had me doubting my knowledge on the subject. Now I had been hearing all of my time doing this stuff that XHTML was pushed as the replacement to standard SGML-based HTML, which after some reading I found to be true.
We're all avid internet users I assume, so I'll trust that everyone here can agree that wikipedia is a pretty good source most of the time.
XHTML is "a reformulation of the three HTML 4 document types as applications of XML 1.0".[1] The W3C also continues to maintain the HTML 4.01 Recommendation and the specifications for HTML5 and XHTML5 are being actively developed. In the current XHTML 1.0 Recommendation document, as published and revised to August 2002, the W3C comments that, "The XHTML family is the next step in the evolution of the Internet. By migrating to XHTML today, content developers can enter the XML world with all of its attendant benefits, while still remaining confident in their content's backward and future compatibility."[1]
I was too lazy to take the citations out so I'm sure it looks pretty rough, but that clearly states, while vague, that W3C had intended on an XML-based HTML replacing mainstream HTML to eliminate HTML's problem of continually becoming less and less well-formed, and so that web pages could be parsed using standard XML parsers, which were already widely accepted.
To answer Fang's original question about why they are still producing HTML5, which I might add they are co-producing along side XHTML5:
In October 2006, HTML inventor and W3C chair Tim Berners-Lee, introducing a major W3C effort to develop new XHTML5 and HTML5 specifications, posted in his blog that, "The attempt to get the world to switch to XML ... all at once didn't work. The large HTML-generating public did not move ... Some large communities did shift and are enjoying the fruits of well-formed systems ... The plan is to charter a completely new HTML group."[24] In the current HTML and XHTML 5 working draft, its authors say that, "special attention has been given to defining clear conformance criteria for user agents in an effort to improve interoperability", "...while at the same time updating the HTML specifications to address issues raised in the past few years." Ian Hickson, author of the important paper criticising the use of XHTML in 2002[19], is a member of the group developing this specification and is listed as one of the co-authors of the current working draft.[25]
Like I said before I even read this article, the transition from HTML to XHTML was much too sudden for the general designing public who were perfectly content with HTML and had trouble believing there was a point in changing anything at all.
It is pretty safe to say that at this point, HTML isn't going away, but it is because they've tried in the past and it didn't work. Quite simply, the two co-exist because some have taken to one, while others refuse to leave the other.
Charles
01-29-2009, 05:47 AM
Read the FAQ to which Mr. Fang linked, especially the first question. The reason for XHTML was essentially two fold. They wrote it because they could, and so that one could mix mark up languages. These mixed mark up languages aren't going to work on normal people's browsers but they will work for isolated communities. Like XHTML + MathML for mathematicians. For the general public, use and always use HTML.
followthehollow
01-29-2009, 07:06 AM
For the general public, use and always use HTML.
From my office, I can't seem to access w3c's site. It always times out, and I don't exactly feel like troubleshooting the issue.
Regarding your quote however, I disagree. Though there may have been some ulterior motive for creating XHTML at the time, w3c expected a migration process where people began using it instead. What they got, was a community so HTML-influenced that the transition never really happened. The result was them saying, instead of doing away with HTML altogether, to just co-develop them side by side and give people the option of using either.
The only major difference between the two in the real world, aside from syntax obviously, is the parser they use and thus, how the browser interprets each. I won't say that XHTML does this better, as traditional HTML has come a long way. I will say though, that given how just about every modern browser and/or web server should have some means in which to decipher XML, that it is perfectly acceptable to use either language when creating web pages. That goes for the general public or isolated communities. No FAQ from seven years ago is going to change my mind about that.
EDIT: Sorry for the lack of sources this time around, I just looked up every article I could on the subject for about two hours yesterday, and I couldn't find a single one that mentioned XHTML being used sparingly as some quirky alternative for small audiences. XHTML to me, has always been just another way to design a web page that just about everyone can see. Now just maybe there is a few people out there running a custom-made browser that in their haste, they forgot to give it XML parsing abilities, but that just seems ridiculous to me.
webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved.