FF vs. IE7 woes

bluestrobe

Platinum Member
Aug 15, 2004
2,033
1
0
This is my mockup for my new site layout. I was fine until last night when I started putting some of the current content into the new layout. This is my current CSS. All works fine in FF(3) but I found my articles with longer links are screwing up the page in IE7. Basically the center section (content) is pushing out the left menu forcing the menu to the bottom of the content box. It appears that IE7 is pushing the content box 2 pixels to the right whenever a larger link shows up in the content code. The size of the boxes are 150px for the left and right menus and 650px for the center content box. Is there any way to lock the box at 650px instead of having it at whatever IE7 wants?
 

bluestrobe

Platinum Member
Aug 15, 2004
2,033
1
0
That fixed the IE7 issue. I have a few people who still say it does it in IE6 but I'm less concerned on that issue.
 

bluestrobe

Platinum Member
Aug 15, 2004
2,033
1
0
Here is a new problem. I have tables for information layout/presentation here. If you notice, the colors don't show up on FF but they show up fine on IE7. I know it's probably something dumb so what am I missing here? I figured I would keep it in this thread.
 

Snapster

Diamond Member
Oct 14, 2001
3,916
0
0
You are missing a hash on the colour:

ie

<tr bgcolor="FF9999">

should be

<tr bgcolor="#FF9999">
 

Woosta

Platinum Member
Mar 23, 2008
2,978
0
71
I would also make sure I have a valid page before recommending a standards compliant browser to view the (broken;invalid) page.
 

bluestrobe

Platinum Member
Aug 15, 2004
2,033
1
0
I have ran it through that validator. However, the validator is telling me there are a lot of things wrong that are clearly stated right all over the internet. I run it through that validator and the CSS checker when I make major changes so the link is nothing new. I know the current site isn't right but it was rushed and I am avoiding that with this new layout.
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
Just because some site/tutorial says something is valid HTML doesn't mean it's valid against the spec. you are using. The w3 validator is usually pretty good at pointing out what is wrong, but just in case http://www.w3schools.com has good pointers for following the specs as well as examples.
 

Woosta

Platinum Member
Mar 23, 2008
2,978
0
71
Avoid w3schools at all costs, try htmldog.com or htmlhelp.com - just look at the markup on w3 schools.. horrible outdated 90s style (ugh) with sometimes inaccurate information.
 

bluestrobe

Platinum Member
Aug 15, 2004
2,033
1
0
Originally posted by: Snapster
What do you believe is right that the validator is picking up? Just a quick check on http://www.policeposers.com/test/ and you can clearly see quite a few things which should be fixed to be considered valid.

I ran the validator on a bunch of large web sites and all failed with the validator. Actually I can't find one site that passes. I'll pull up some examples from my web page later that I didn't agree with.

 

Woosta

Platinum Member
Mar 23, 2008
2,978
0
71
So just because the large sites don't validate means you don't have to? I guess we should throw away all standards and do whatever we want, code however we want and use start and end tags whenever we want, whether an element is self enclosed or not we can just throw in '/>' or omit the end tag because its less work. It doesn't matter what the w3 spec says, we should also use identifier values that are invalid, because they're more readable (id="061308" is so readable). This way, we are reliant upon how lenient the user agent was coded to be, so some browsers let you get away with more invalid shit while other strict browsers dont, and this is where all the inconsistency comes up, and this is the WHOLE POINT of why STANDARDS were created in the first places (oh yeah.. and people have tried the 'code however I want' crap years ago.. newsflash it didn't work out).

Time for a little code review.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<html xmlns="http://www.w3.org/1999/xhtml">

This makes a lot of sense. Wrapping <html> in <html> and one start tag has an attribute while the other does not. This also makes no sense because you are mis-using xhtml and feeding it as text/html, which really is not true xml/xhtml, and therefore you should be using HTML 4.01 Strict as your DTD ( yes I know that the w3 in the spec lets you support legacy content by using XHTML for text, html BUT THE WHOLE POINT of XHTML was to rewrite HTML in XML and therefore the document SHOULD BE FED as XML which is why sending xhtml as text/html is stupid ).

<title>Policeposers.com</title>
<link type="text/css" href="includes/style.css" rel="stylesheet" media="screen" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<META HTTP-EQUIV="Keywords" CONTENT="whacker, impostor, impostors, emergency, lights, beacons, wannabes, public, safety, wannabe, sirens, whackers, light, laws, international, ems, fire, department, police, TAMSAR"/>

That should be name="keywords" as http-equiv isnt a valid attribute on the meta element - I don't know why these are inconsistent.. most of your tags are lowercase and here randomly they're uppercase.. unless you just pasted from after googling meta tags.

<META NAME="description" CONTENT="All of the questions you wanted to ask about police and fire fighter wannabes and imposters but didn't know where to look. Also great information tool on how to identify wannabes of the public safety profession and how to identify whackers and their emergency lighting abuse."/>
<meta name="copyright" content="Copyright 2008 PolicePosers.com - All Rights Reserved">

Again, more inconsistency. Make everything lowercase. and the second end tag has html 4 style closing, while the previous one has the xhtml style self enclosing tag. Stick with one doctype and be consistent with end tags.

</head>
<body>
<div id="wrapper">
<div id="header">
<a href="http://www.policeposers.com/test/images/testbanner.jpg" target="_blank"><img src="http://www.policeposers.com/test/images/testbanner.jpg" border="0" alt="PolicePosers.com"></a> </div>

Border attribute and stylistic properties/attributes have been deprecated in favor of CSS. In addition, all these useless little stylistic attributes are just more bytes on the page. Every page having border="0" adds up and makes it harder to read as well, while an external stylesheet is cached.

<div id="container">
<div id="left">
<hr></hr>

Presentational names should not be used, as the position can change at any time in the future - makes more sense using meaningful names. Also, horizontal rules are very inconsistent (spacing-wise as well) and I would rather you create custom graphics and attach them as background images on your list items and headers. And if they become images they can be more graphical

<h4>Site Pages</h4>

Ok. So why are you using h2 and h4 without an h1 and h3?

<h4>Friday, 07/04/08<a name="070408" id="070408"></a></h4>

Values for the id attribute cannot begin with an integer. Use a-zA-Z before that.

<hr></hr>
<p><a href="index.php">Home</a></p>
<hr></hr>
<p><a href="laws.php">Light Laws</a></p>

<hr></hr>
<p><a href="faqs.php">FAQ's</a></p>
<hr></hr>

The text 'Home' is not a paragraph. You should be using a list item, and you should style the list items and adjust the spacing and you can get rid of the default markers that uls have.

<div id="content">
<div align="center">

More stylistic attributes that you need to get rid of.

<div align="center">
<div style="border: 4px solid #cccccc; background-color: white; width: 115px; text-align: center;padding: 0 0 10px 0;"><center><a href="http:/www.sootle.com/"><img border="0" src="http://directory.sootle.com/images/ben.gif" style="border:0;"></a></center><br /><span style="font-size: 11px;">This website is worth</span><center><img border="0" src="http://directory.sootle.com/te...l=www.policeposers.com" name="MyImage"></center></b><br /><span style="font-size: 10px;"><a href="http://directory.sootle.com/website-worth/">What is your website worth?</a></span></div> </div>

Inline CSS = no no. You shouldn't be using presentational elements either.

<h5>Copyright (c) 2006-2008 PolicePosers.com USA. All Rights Reserved.</h5>
<h5>This web site is best viewed on <a href="http://www.mozilla.com/en-US/firefox/">FireFox 3</a> (preferred) or <a href="http://www.microsoft.com/windo...loads/ie/getitnow.mspx">Internet Explorer 7</a>.</h5>

The latter isnt really a heading - I would mark it up as a paragraph. In my opinion you have no right to suggest a highly standards compliant browser such as Firefox 3 if your code isn't up to par, and why are you not suggesting *the* most standards compliant browsers - Opera 9.5 and Safari 3?

It doesn't make any sense to me why people who promote standards, and have promoted them even when Firefox had an even smaller demographic do not care about Opera or Safari - since they are doing it better than Firefox is currently (not to mention they are blazingly fast although Safari has some UI issues and isnt as friendly as Opera which takes some time getting used to).
 

bluestrobe

Platinum Member
Aug 15, 2004
2,033
1
0
I didn't say I was quitting on the validation part. I just find it funny I can't find anything that passes. I already made some changes to bring things more compliant and will continue to do so as time allows. This is still a learning process for me and I admit I'm not perfect. Thanks for the help you have provided and I will be working on the changes.

edit: Also I don't care for the condescending attitude and subtle insults. The help would be much more appreciated without you trying to prove how smart you are compared to how dumb you think I am.
 

techfuzz

Diamond Member
Feb 11, 2001
3,107
0
76
Originally posted by: bluestrobe
I just find it funny I can't find anything that passes.
Many sites are coded for support of the major browsers and currently IE is the most popular. IE is one the LEAST standards compliant of all browsers. For the sites to display correctly in these the popular browsers, many use non-standards compliant hacks which do not validate.

techfuzz
 

bluestrobe

Platinum Member
Aug 15, 2004
2,033
1
0
Originally posted by: techfuzz
Originally posted by: bluestrobe
I just find it funny I can't find anything that passes.
Many sites are coded for support of the major browsers and currently IE is the most popular. IE is one the LEAST standards compliant of all browsers. For the sites to display correctly in these the popular browsers, many use non-standards compliant hacks which do not validate.

techfuzz

I figured as much. I will probably end up having some errors but I want to get it as low as I can.