Help Please: xhtml and iFrames

  • Thread starter Thread starter kart.no.38
  • 4 comments
  • 492 views
Messages
604
South Africa
South Africa
Messages
david_perel
I have been trying to make my entire website 'Xhtml Transitional' approved.

So far so good, most problems I have been able to fix. Except one.

In the main area of the site (not the forums) I use an <iframe> which displays all the content.

The problem comes in when the content exceeds the height of the <iframe>, so what happens is a vertical scroll bar appears (perfectly normal) but for some reason, when I have the Xhtml Trans DOCTYPE, a horizontal scroll bar appears as well and the content stretches an extra 5% (Horizontaly) or so.

This problem only occurs with Xhtml doctypes and IE Explorer.

Any Ideas why? Jordan?

my site: GT Playground
 
frames are depricated from XHTML Transitional. However, there is a solution while in Transional there is a seperate DOCTYPE that supports frames all you need to do is change your DOCTYPE on the page that sets the frames to this:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

Once XHTML 1.1 or 2.0 is released you will have to get a new layout that doesn't use frames or hope that Microsoft add support for the CSS attribute position: fixed;

Having looked at your site there may even be another solution, you could use the CSS attribute overflow: scroll;
 
I think that Microsoft and Mozilla won't have much choice but to support transitional Web sites in their next version.

There are too many websites under opperation out there which haven't made the switch even to transitional.

I for will definitely be making the switch because I am aware of the potential dilemma.

I would say that at least 70% of the net is still using old code etc, can you imagine the $#@$ that Mozilla or Microsoft will recieve if they their next versions don't support their sites? I can.
 
WhyWontYou, the question is about iframes, not ordinary frames.

I think that the answer lies in CSS. You should be able to force it to switch off the horizontal scrollbar.
 
Dont worry guys I found the solution about a week ago and forgot to edit this thread.

Anyway all you do is say "scrolling='yes'>" in the iframe tag.

Thanks for the help though :wink:
 

Latest Posts

Back