|
|
#1 (permalink) |
|
Registered User
Comfy Contributor
Joined in Apr 2004
Lives in Asia
Hosted on Sky
123 posts
Gave thanks: 0
Thanked 0 times
|
Different Browsers show different layout?
If you go to my website, you will see a Cross Browser marquee and below it there is a search box.
The Cross Browser marquee is set for center aligned and Search box is set for right aligned. If you browse with MS Internet Explorer, there is correct display. But with Opera, the search box is changed to center aligned. With NetScape, The marequee shows only half frame and the search box is also aligned to center. I am very much confused of this matter. Do you have any idea or can tell me what's wrong with this? Thanks and appreciated. |
|
|
|
|
|
#2 (permalink) |
|
Registered User
Seasoned Poster
Joined in Jul 2003
Lives in Research Triangle Park, NC / Blacksburg, VA
57 posts
Gave thanks: 0
Thanked 0 times
|
Certain browsers will render pages differently because they have different interpretations of what defaults should be. The best way to avoid this is to explicitly state how things should be flowed and aligned to ensure that all browsers are forced into the same schema.
I'd be willing to guess that the reason netscape is displaying differently is because the script uses DHTML (a late-90s technology) which is implemented completely differently on both IE and Netscape and this script tries to accomidate both. It is probably just a shortcomming of the script. As far as your search box goes, your HTML is structurally invalid. You wanted to push it to the right by setting a containing paragraph's tag align to right, but the paragraph tag was never even closed out (so when does the browser know to stop aligning right? This error might cause some browsers to ignore the declaration entirely). I wouldn't recommend this approach (with paragraph tags) anyway since using HTML to achieve purely presentational effects is generally a bad practice. You'd probably want to put a width:100%; and text-align:right; in a css declaration for the form tag to push all of the input elements flush right. And if that scroller is absolutely necessary I would consider either using the DOM in lew of the old DHTML stuff or flash. And when in doubt about why something isn't displaying right, validate your code. If you're not offering syntactically correct HTML there's no saying what each browser will actually produce with the broken code. Justin
__________________
"I tried to go to Target but I missed" ~Mitch |
|
|
|
|
|
#3 (permalink) |
|
Registered User
Comfy Contributor
Joined in Apr 2004
Lives in Asia
Hosted on Sky
123 posts
Gave thanks: 0
Thanked 0 times
|
Many thanks for your explanation VTJustinB.
I would like to use such Cross Browser marquee to diplay logos as you see and pause when mouse over it then click to go to the link. I much appreciated if you could advise me one good and easy script to use for this. Thanks again. |
|
|
|