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.
|
|
|
|
|
![]() |
||
XHTML causing CSS problem
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
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. |
|
|
|
#2
|
|||
|
|||
|
Re: XHTML causing CSS problem
For starters, get rid of this line from the top of your pages.
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. |
|
#3
|
|||
|
|||
|
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)
|
|
#4
|
||||
|
||||
|
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. |
|
#5
|
|||
|
|||
|
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. |
![]() |
| Tags |
| css, xhtml |
| Thread Tools | |
|
|
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 |