Click to See Complete Forum and Search --> : Another funny crossbrowser problem


morten
07-04-2006, 03:48 PM
My last post here was about pictures that did'nt show up in all browsers. After a funny story on computer history somebody told me that my .jpg's was'nt really jpg's at all! -That solved my problem then :o .
Now i am finishing up my website and after checking that everything worked smoothly and making some adjustments SOMETHING happened!

All the buttons on the first page (index) was incapacitated! For some silly reason they just did not change color (they're made with css rollover-movement-fantastic-effect, whatever it is called) and the hyperlinks were dead!

I was running safari on my mac so i swiched to opera just to find that three of the 10 pages was out of alignment! -Well then i tried MoZilla, my new friend, were every thing looked perfect and worked like a charm!

Now to the funny part: Every single page are IDENTICAL with exception of some text inside a content box and one button!! :eek:
So what do i do?
-I try to copy one working page and paste it in the broken ones. :D
Hmmm. Still there, same problem, on the same pages!

If you want to look at this mystical page,
here is the URL:www.pandp.no (http://www.pandp.no)
And you can find the css at: /stylepandp.css (http://www.pandp.no/stylepandp.css)
Have anybody seen such rude and discriminating behavior from different browsers?
Where can i find the beat-the-browser-stick??
Or should it be: beat-the-idiot-author-stick..

-morten

WebJoel
07-04-2006, 07:53 PM
There are 24 errors (mostly "warnings", which are minor and easily dismissed).

But there are some "warnings" which are rather damaging, like the ones shown in the attached image. Why it works in one compliant brower and fails in a second compliant browser is a complete mystery... Usually, one only sees this working in IE, which 'understands' what you're trying to do...

morten
07-05-2006, 12:50 PM
Does this mean that i have to close tha hyperlinks before i close the div?
I don't see why it has been working for some time, but suddenly stopped now!?

What kind of program are you using to see these warings, sir?

-morten

toicontien
07-05-2006, 01:24 PM
He was probably using his text editor. You can use a free online HTML validator at http://validator.w3.org/

As for HTML tags, you will want to head to www.w3schools.com and learn the basics. It matters in which order you open and close tags. Always do them in the correct order:

<div>
<a>
Foo
</a>
</div>
And note that you also can't do
<a><div>some text</div></a>
Inline elements cannot contain block elements in HTML and XTHML 1.0. You can always set the <a> tag's display to block so it behaves like a DIV tag.

morten
07-05-2006, 01:32 PM
Oh really?
I thought that was the way to make my images from css work as hyperlink!?
So...:
<a href...><div id="..."></div></a>
...this is not a nice way to make my nice buttons work?
If i put the <div> outside it sertanly will not work :(
How should i put it then?

I call on the image with css and i thought HTML could make it a link..?
Well it worked.... for a while :p

-morten

morten
07-05-2006, 03:32 PM
WOW! No need to give anymore great hints guys! (i specially liked the one about the basics. lol)

The validator worked very well. It said that just about everything i wrote was wrong and found heaps of errors.

I am not the one that is unclear, it's just the limited understanding of the browsers..
I finally got the problem:
I changed a tag from <strong> to </strong> ..and that ended my troubles, litterary.

I'll go back to the basics later some time when i want one of those W3C-VALIDATED-stamps on my website, hehe. Cheers

-morten

toicontien
07-05-2006, 06:20 PM
The W3C valid markup, whatever stamps aren't required. In fact, use the Standards as tools and methods to achieve a goal. The standards shouldn't be the goal you achieve. I know this can be a touchy subject here, but don't believe you MUST adhere to the standards if you want to keep your head. Using the standards means you're wroting code that modern browsers will understand reasonably well, and with a reasonable amount of predictability.

WebJoel
07-05-2006, 07:58 PM
The W3C valid markup, whatever stamps aren't required. In fact, use the Standards as tools and methods to achieve a goal. The standards shouldn't be the goal you achieve. I know this can be a touchy subject here, but don't believe you MUST adhere to the standards if you want to keep your head. Using the standards means you're wroting code that modern browsers will understand reasonably well, and with a reasonable amount of predictability.

You have a very relaxed manner of explaining things. It is always a pleasure to read your posts. :)

morten
07-06-2006, 10:22 AM
And to understand how to put your words in action, i should know a whole lot more about the basics.
That's how i see it and i am amazed that i can make things work with just jumping from a to w... (If i had a validated website i would sertenly put a stamp on it to show off :-p)
Thank you for your comments on this subject. I would'nt find my miswritten tag without the validator:)

-morten