Frameset Borders



I just thought I'd post this for any that care. I'm sure it has been
explained before.


This topic deals with the differences in framesets between IE (Internet
Explorer) and Firefox.

Why framesets?
Well they may be a pain to program with, but they provide a nice
interface.

I recently spend a handful of minutes trying to determine the
differences between how IE handles framesets versus how Firefox does.

Framesets have a few non-standard properties that are relevant here.

frameborder
framespacing
border
bordercolor

These attributes are not documented on W3C, but firefox and IE both
understand them.

frameborder
This attribute tells the browser to render a border on the frames or
not. It can have a value of 0 or 1. 0 = hide borders, 1 = show
borders

framespacing
This attribute is only understood by IE. It tells the browser how wide
to render the borders. A wider border is easier to grab if the frames
allow resize.

border
This attribute is understood by IE and Firefox. However, IE will
override this value if the framespacing value is present.

bordercolor
This attribute tells the browser to render the borders with the given
color.

Then, on top of that IE actually renders the borders a few pixels wider
than Firefox. So a border="5" will render at around 7 or 8 on IE and 5
on Firefox. We can actually use these incompatibilities to our
advantage. Take the following HTML:

<frameset rows="80px,*" frameborder="1" framespacing="3" border="5"
bordercolor="#C00000">
<frame noresize="noresize" bordercolor="#C00000" />
<frameset cols="100px, *">
<frame />
<frame />
</frameset>
</frameset>

This will render borders of equal sizes on both browsers. Also, it is
important to note that though these attributes are properties of the
frame element, the browsers recognize them fine on the frameset
element. Any frames or framesets child to a frameset inherit its
properties. So adding these attributes to the root frameset
effectively gives us the options we want.

Go here to test this:
http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_frame_cols

Hope this helped someone...

.



Relevant Pages

  • Re: HttpWebRequest Not Supporting Frames (example included)
    ... > using framesets. ... I get the response "This page uses frames, ... > setting the UserAgent property to a recognizable browser, ... It appears to be happening with any website I try that uses ...
    (microsoft.public.dotnet.languages.csharp)
  • Problem bei der Web-Aktualisierung auf dem HOST-Server
    ... FrameSets als iFrame eingefügt ... und dann das Web neu hochladen ... , bevor ich das Web im Browser öffne, also von daher kann es ... ohne löschen der jeweiligen Seite sofort angezeigt wurden wieder ...
    (microsoft.public.de.frontpage)
  • Re: No Framesets allowed
    ... but have been told NO FRAMESETS. ... I have never seen a with text based browser. ... Finally make a .php script and from there use the include function of php to include the files. ... Use require_once to include the script with the function into the script that needs to do the including. ...
    (alt.php)
  • Re: HttpWebRequest Not Supporting Frames (example included)
    ... That's not because the site actually thinks the browser doesn't support ... had ignored the framesets contained within the HTML. ... HttpWebRequest doesn't and shouldn't need to have any explicit support ...
    (microsoft.public.dotnet.languages.csharp)