Jump to content

Why SHOULD I use XHTML?


iyeru42

Recommended Posts

Don't try and style the html and body elements, use a 100% div in the body to do styling like that. In most of my pages I have several divs start after the body that are just containers for the rest of the content. About the only thing I do with the body is background styling.

Link to comment
Share on other sites

  • Replies 68
  • Created
  • Last Reply

Top Posters In This Topic

Guest FirefoxRocks

By the way (iyeru42):I'm glad that you used my XHTML code for your index page! Very nice! :)Would you like your other pages converted to XHTML and optimized also? I can do that for free and send you the code via email at the GMail address. You do however may want to add some nice text and content into your pages :) Everyone: I can "validize" your pages for free here. Please read notice below.Notice: If you have more than 10 pages that need to be optimized or more than 5 pages that have WAY, WAY too many errors on them then I will seriously need to either charge credits or have a discussion about next steps.

Link to comment
Share on other sites

hey, ffrocks, thought I recognized you. Howsit going? Aren't you at Asta now?And yes, what justsomeguy says, add a wrapper or container div to centre that stuff works well.

Link to comment
Share on other sites

Guest FirefoxRocks

LOL It took you that long to recognize me here from Astahost?!?!? :) :) Anyways, I tried that and it doesn't seem to work in any browser.

Link to comment
Share on other sites

block level elements are centered with margin:0 auto, not text-align: center.
Actually, they are centered with text-align: center; on the parent element for browsers IE LTE 6 (don't know about IE 7). Opera, Firefox and Safari on the other hand support the correct margin: 0 auto;:)
Link to comment
Share on other sites

I'll probably do the rest myself. After all, I know how to code, just not with XHTML. :)
You're saying it as if the difference is very big :) .
Link to comment
Share on other sites

Actually, they are centered with text-align: center; on the parent element for browsers IE LTE 6 (don't know about IE 7). Opera, Firefox and Safari on the other hand support the correct margin: 0 auto;:)
microsoft officially dropped support for ie5 last october (http://www.microsoft.com/mac/products/internetexplorer/internetexplorer.aspx?pid=internetexplorer).
Link to comment
Share on other sites

IE5.5 is still used on MACOSX though. Although Safari is now the default browser (OS9 didn't have it installed default though.)
Yes you can still use IE on a mac but it is no longer supported and there will be no further patchs or updates for it.
Link to comment
Share on other sites

By the way, since I made the changes... it looks perfect in Firefox, but the JavaScript news variable isn't written and what's worse is the logo AND the wrapper DIV don't obey in Internet Explorer.

Check out my site in IE6 after I put the XHTML/Valid code in. Note that my newsbox doesn't exist and that my wrapper is missing. But it looks fine in other browsers.iyeru42--XHTMLProblems.png
From the other topic. This is in IE7 AND below now that I have a chance to view it via IE7 at home, and after fixing the CDATA problem. Yes, JavaScript IS enabled. Even if it weren't, and it were properly made, the wrapper would show along with the logo.
Link to comment
Share on other sites

I don't know if there's a link to your site somewhere in here, but I can't find it.
Here's the link to my site. But if you're referring to the links on my page (IE: Home, OvBB MODs, etc.) They only work in Firefox after using the valid code.
Link to comment
Share on other sites

I'm thinking the navigation is having problems because the z-index is -1. That's probably why the links are not working, because there is something (like the body) on top of the nav element that is receiving the clicks instead of the links. Opera doesn't even display it at all. You generally want to stay away from negative z-index if you want the element to be onscreen and usable. The wierd thing is that the z-index -2 element is showing up. Also it's probably unnecessary to have position:relative on the nav, especially if you aren't specifying a left or top property.The code actually looks pretty good though, there aren't any obvious reasons (obvious to me) why IE in particular would butcher it so bad. On Opera everything looks fine, the logo shows up, but the nav is still hidden. I think that's the z-index issue, but it might be position. I haven't had problems like that with position myself though, so that's why I'm thinking z-index. A layout like this doesn't look like it needs any z-index properties at all, just leave them all to default. There's no reason to change things if they aren't a problem.

Link to comment
Share on other sites

I took out all the z-indexes. But it still looks the same in Internet Explorer. However, now the links are working.Everythings all fine and dandy now. Position Relative was the problem.

Edited by iyeru42
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...