Forum Moderators: not2easy

Message Too Old, No Replies

CSS and Iframes

css,iframes,multiple frames

         

Uifz

2:20 am on Jul 30, 2008 (gmt 0)

10+ Year Member




Hi,

Well, I have decided to implement iFrames on my website, however as content
may change varying from frame to frame, this can be quite a hassle if I plan
on the site having 100+ pages. This is where CSS comes into play.
Is it possible for me to set some type of CSS command that will allow each
iFrame (I plan on having 3 on each page since these are web-based apps) to be set to one standard size
throughout....And when the times comes, possibly instead of editing each page
one by one, I can just adjust this CSS script?

If so, How would I implement such?

Marshall

1:03 pm on Jul 30, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



CSS -

iframe {
width: 200px; /*whatever works for you*/
height 150px; /*again, whatever works for you*/
margin: 0; /*optional*/
padding: 0; /*optional*/
}

And welcome to WebmasterWorld.

Marshall

Uifz

12:24 am on Jul 31, 2008 (gmt 0)

10+ Year Member



Thanks for the help but how do I distinguish the difference between the 3 iframes?

Marshall

3:37 am on Jul 31, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



to be set to one standard size

The CSS I provided does this. If you are looking to set individual frames, you will have to assign a class to each frame.

.frame_one {
width:
height:
}

.frame_two {
width:
height:
}

.frame_three {
width:
height:
}

HTML

<iframe class="frame_one> </iframe>

and so on.

Marshall