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.



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

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
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
Send a message via MSN to dartiss Send a message via Skype™ to dartiss
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.
Reply With Quote

  #2 (permalink)  
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
Send a message via Skype™ to ukgeoff
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.
Reply With Quote
  #3 (permalink)  
Old Oct 25th, 2006, 13:22
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,765
Blog Entries: 1
Thanks: 0
Thanked 18 Times in 18 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
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.
__________________
The internet is just a fad.
http://www.mevans76.com
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Reply With Quote
  #4 (permalink)  
Old Oct 25th, 2006, 22:59
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
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.
Reply With Quote
  #5 (permalink)  
Old Oct 26th, 2006, 13:31
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,765
Blog Entries: 1
Thanks: 0
Thanked 18 Times in 18 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
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.
__________________
The internet is just a fad.
http://www.mevans76.com
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)

Last edited by moojoo; Oct 26th, 2006 at 13:39.
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 13: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 03:12.


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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43