XHTML causing CSS problem

This is a discussion on "XHTML causing CSS problem" within the Web Page Design section. This forum, and the thread "XHTML causing CSS problem are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Oct 25th, 2006, 09:15
Junior Member
Join Date: Jul 2006
Location: Nottingham, UK
Age: 37
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
XHTML causing CSS problem

Hi everyone,

I've recently converted a website of mine to XHTML. However, I've found that on older IE browsers, it's causing a problem.

The main page should be centred, via the CSS I've used, but it's not in these browsers. This has only changed since the XHTML conversion.

The URL is:
http://copyplus.artisswebdesign.co.uk

Any thoughts/suggestions on what I need to do?

Many thanks
David.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Oct 25th, 2006, 10:09
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Re: XHTML causing CSS problem

For starters, get rid of this line from the top of your pages.
Code: Select all
<?xml version="1.0" encoding="iso-8859-1"?>
It's not mandatory and it throws IE into quirks mode.

While you were taking the trouble to upgrade to xhtml, it would have been a good idea to have got rid of tables as a layout tool and used div's instead and used an unordered list for your menu.

You should go through your pages and remove all the 'px' from width and height attributes. The 'px' is not proper xhtml.

Also the target attribute is deprecated in xhtml so an alternative if you must use it needs to be found. Opening new windows these days is generally frowned upon from an accessibility viewpoint.

Suggest you tidy your css file up so that each style block and each attribute within the block start on a new line. It will make it a lot easier to read and debug if and when required.

Also you should use all lowercase, e.g., table not TABLE. You will get away with it now but if you decide to go from transitional to strict xhtml, it will cause you problems.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Oct 25th, 2006, 13:22
Elite Veteran
Join Date: Aug 2005
Location: That Place
Posts: 2,044
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
Re: XHTML causing CSS problem

Your CSS when viewed is one big ass horizontal line of code so I am not going to mess with that but one thing I did notice is this:

your background statement should be:

background: #colorvaluehere url(../images/foo.jpg) top center repeat-y;

Also good to note is IE 5.x etc will not support margin:0 auto; you have to text-align center the body and then text-align:left; your container to compensate.
__________________

Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Oct 25th, 2006, 22:59
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: XHTML causing CSS problem

No, it should be #fff url("...images/foo.jpg") 50% 0 repeat-y;

"top center" should be reversed, but "50% 0" uses less code anyway.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Oct 26th, 2006, 13:31
Elite Veteran
Join Date: Aug 2005
Location: That Place
Posts: 2,044
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
Re: XHTML causing CSS problem

:o You don't need the quotes when using a file path as far as I know and are you sure ...images will work? from my experience ../images is/has been the way to go. ".." being root/subfolder/file and you are right it is x then y.. grargh.
__________________

Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)

Last edited by moojoo; Oct 26th, 2006 at 13:39.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
css, xhtml

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Css border causing issues. Bocaj Web Page Design 6 Jun 8th, 2008 20:17
CSS and Xhtml problem shitalg Web Page Design 2 Jan 21st, 2008 14:52
<form> tag in <table> is causing alignment issues - HELP! Love2Java Web Page Design 5 Sep 4th, 2007 15:27
Meta tags causing random whitespace in IE? Tino Web Page Design 4 Aug 7th, 2006 20:32
CGI page loads only halfway, parameters causing problems k.n. PHP Forum 3 May 13th, 2005 01:40


All times are GMT. The time now is 09:51.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved