Jump to content

Frameset Width, Height, And Border


Rain Lover
 Share

Recommended Posts

Hi everyone,How can I set a fixed width and height for the whole frameset:

<html><frameset cols="25%,50%,25%">  <frame src="http://www.w3schools.com/html/frame_a.htm">  <frame src="http://www.w3schools.com/html/frame_b.htm">  <frame src="http://www.w3schools.com/html/frame_c.htm"></frameset></html>

I'd like the frameset to be just 400 x 200 px. But when I insert the above code it covers my whole webpage.Also I'd like to put a border around the frameset.Your help is really appreciated!RegardsRain Lover

Link to comment
Share on other sites

do you know about CSS? I would imagine you could apply widths and borders to the frameset tag, but if not, you can just wrap it all within a container div and try setting the styles to that instead

Edited by thescientist
Link to comment
Share on other sites

I tried the following to no avail:

<html><head><style type="text/css">frameset {width:400px; height:200px; border:1px solid black}</style></head><frameset cols="25%,50%,25%">  <frame src="http://www.w3schools.com/html/frame_a.htm">  <frame src="http://www.w3schools.com/html/frame_b.htm">  <frame src="http://www.w3schools.com/html/frame_c.htm"></frameset></html>

I also tried div tag:

<html><div style="width:400px; height:200px; border:1px solid black"><frameset cols="25%,50%,25%">  <frame src="http://www.w3schools.com/html/frame_a.htm">  <frame src="http://www.w3schools.com/html/frame_b.htm">  <frame src="http://www.w3schools.com/html/frame_c.htm"></frameset></div></html>

But it doesn't work either.

Link to comment
Share on other sites

Frameset documents are touchy. All they can contain is frame-type elements. A possible solution would be to create a normal HTML document whose only element is an iFrame styled in such a way. The src of the iframe would the existing frameset document.Complicated? Yes.The W3 people really want to discourage frames generally, so they're not doing very much to support them CSS-wise. That's life.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...