Solve : Cross-browser trouble?

Internet and Networking Web design in Internet and Networking . 3 years ago

  0   0   0   0   0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Ack. The big problem of my time is STILL getting pages to work across browsers.

Well, I read that frames are deprecated by the W3C. Now, that rarely stops me, I can use the transitional or loose .dtd files if necessary. However, my mother has her site indexed by Google, and I've seen pages that are supposed to have frames but since Google linked to main.html instead of index.html, didn't have them. Wonderful. So, I'm trying to use the CSS attribute position: fixed. In fact, my total CSS code for that element is:

Quote

div.nav { border-top-style: none; border-right-style: solid; border-left-style: none; border-right-color: black;
border-bottom-style: solid; border-bottom-color: black; text-align: center; background-image: url("parchment_alt.gif");
position: fixed; top: 0px; left: 0px; width: 20%; }

My site in PROGRESS validates against transitional XHTML 1.0 and CSS standards. Great!

BUT... guess which highly popular browser doesn't support the CSS "position" attribute? I dunno about IE 7, but IE 6 sure as *censored* doesn't!

In FireFox, Netscape, and OPERA, I get my NAV bar to appear as normal. However, if I attempt to load the page in IE, it has the NAV bar in the correct position, but the content is below the NAV bar, and the NAV bar doesn't move with the page!

Is there any way to make this work in all browsers, that is not deprecated by the W3C?? Or will I just have to write code to display a warning in IE only?position is understood by IE6.  Different browsers interpret the box model slightly DIFFERENTLY however.  Floats can be particularly troublesome.  Cross-browser incompatibility is the main reason I still use tables for LAYOUT; most browsers do almost exactly the same thing with them.

If position: fixed isn't working for you, try position: absolute (generally more efficient).  position: relative is also useful, but generally only does what you expect it to, if you place it within a div that has position: absolute (not necessarily with any other style attributes SET).

Mind blowing.

If you want to get your head around CSS and the way support for it is broken on various browsers, you probably will want to spend a lot of time on >Stu Nicholls' site<.  Personally I can't be bothered because tables do what I need when CSS lets me down.

Posted on 21 May 2022, this text provides information on Internet and Networking related to Web design in Internet and Networking. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Tuteehub forum answer Answers

Post Answer

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.