Welcome to WebmasterWorld Guest from

Forum Moderators: not2easy

Message Too Old, No Replies

Designing frames using CSS?



12:19 pm on Mar 11, 2003 (gmt 0)


I want to design my frameset in CSS, so instead of writing

<frameset frameborder=0 border=0 framespacing=0 noresize frame scrolling=no>

I want to write something like

frameset {frameborder: 0; border: 0; ...}

And the same goes for frames. Does anyone know how to do this?



3:41 pm on Mar 11, 2003 (gmt 0)

WebmasterWorld Senior Member suzyuk is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Hi anulaibar and Welcome to WW

In theory yes you can, but the practicality is somewhat different

here is a quote from blooberry.com research into the support of CSS for frames:

* CSS: Before IE v5.5 Beta 1, FRAMEs and IFRAMEs could not use the 'z-index' property (they would always be on the "top" of the rendering surface and nothing could be placed "above" them) and could not be transparent (such that content from positioned content beneath would "shine through".) Beginning in IE v5.5 Beta 1, these capabilities now exist.

* Netscape 6 and CSS: Even though support for the %Core% attributes is listed here, in direct testing it seemed that VERY few CSS properties could successfully be applied to this element.

if it's any help I found that using the "normal" HTML properties to set the main settings on the <frameset> element then it's easier to customise the individual <frame> elements...as frameset didn't want to accept border: 0px; and I don't think there's an equivalent of the "framespacing" attribute

e.g. this example shows the same effect being achieved on the two frames one the usual way, the other the external way

overflow: auto;
border-width: 3px;
border-style: dashed;
border-color: #000080;


<frameset cols="150,*" frameborder="0" framespacing="2">
<frame name="contents" target="main" scrolling="auto" style="border-width: 3px; border-style: dashed; border-color: #000080">
<frame name="main" class="test">




9:23 pm on Mar 11, 2003 (gmt 0)

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member

There were two threads a little while ago on a similar subject: How to emulate frames using CSS.


I have since then improved the CSS to work better in browsers that support overflow:auto in combination with position:fixed.

I can post the updated code if you're interested.


Featured Threads

Hot Threads This Week

Hot Threads This Month