473,803 Members | 4,391 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CSS & iFrame Height !

Hi

I'm trying to make an Iframe height adjustable depending on the height
of the web page.
I have managed to get this to work for the width, but not the height.

The original code is available here: http://www.brainjar.com/css/tabs/

This is what I have:

iframe.tabConte nt {
background-color: #99CCFF;
border: 1px solid #000000;
border-color: #0099CC #0099CC #0099CC #0099CC;
width: 100%;
height: 100%;
}

/*************** *************** *************** *************** *************** ***
* Additional styles.
*
*************** *************** *************** *************** *************** ***/

h4#title {
background-color: #003399;
border: 1px solid #000000;
border-color: #0099CC #0099CC #0099CC #0099CC;
color: #FFFFFF;
font-weight: bold;
margin-top: 0em;
margin-bottom: .5em;
padding: 2px .5em 2px .5em;
}

</style>
<script type="text/javascript">//<![CDATA[

function synchTab(frameN ame) {

var elList, i;

// Exit if no frame name was given.

if (frameName == null)
return;

// Check all links.

elList = document.getEle mentsByTagName( "A");
for (i = 0; i < elList.length; i++)

// Check if the link's target matches the frame being loaded.

if (elList[i].target == frameName) {

// If the link's URL matches the page being loaded, activate it.
// Otherwise, make sure the tab is deactivated.

if (elList[i].href == window.frames[frameName].location.href) {
elList[i].className += " activeTab";
elList[i].blur();
}
else
removeName(elLi st[i], "activeTab" );
}
}

function removeName(el, name) {

var i, curList, newList;

if (el.className == null)
return;

// Remove the given class name from the element's className property.

newList = new Array();
curList = el.className.sp lit(" ");
for (i = 0; i < curList.length; i++)
if (curList[i] != name)
newList.push(cu rList[i]);
el.className = newList.join(" ");
}

//]]></script>

Any ideas ??

Thanks :)

Nov 1 '06 #1
2 3780
dp
je***********@y ahoo.com wrote:
Hi

I'm trying to make an Iframe height adjustable depending on the height
of the web page.
I have managed to get this to work for the width, but not the height.

The original code is available here: http://www.brainjar.com/css/tabs/

This is what I have:

iframe.tabConte nt {
background-color: #99CCFF;
border: 1px solid #000000;
border-color: #0099CC #0099CC #0099CC #0099CC;
width: 100%;
height: 100%;
}

/*************** *************** *************** *************** *************** ***
* Additional styles.
*
*************** *************** *************** *************** *************** ***/

h4#title {
background-color: #003399;
border: 1px solid #000000;
border-color: #0099CC #0099CC #0099CC #0099CC;
color: #FFFFFF;
font-weight: bold;
margin-top: 0em;
margin-bottom: .5em;
padding: 2px .5em 2px .5em;
}

</style>
<script type="text/javascript">//<![CDATA[

function synchTab(frameN ame) {

var elList, i;

// Exit if no frame name was given.

if (frameName == null)
return;

// Check all links.

elList = document.getEle mentsByTagName( "A");
for (i = 0; i < elList.length; i++)

// Check if the link's target matches the frame being loaded.

if (elList[i].target == frameName) {

// If the link's URL matches the page being loaded, activate it.
// Otherwise, make sure the tab is deactivated.

if (elList[i].href == window.frames[frameName].location.href) {
elList[i].className += " activeTab";
elList[i].blur();
}
else
removeName(elLi st[i], "activeTab" );
}
}

function removeName(el, name) {

var i, curList, newList;

if (el.className == null)
return;

// Remove the given class name from the element's className property.

newList = new Array();
curList = el.className.sp lit(" ");
for (i = 0; i < curList.length; i++)
if (curList[i] != name)
newList.push(cu rList[i]);
el.className = newList.join(" ");
}

//]]></script>

Any ideas ??

Thanks :)
Looks ok here. FF 2.0, IE7

--
dp
Nov 2 '06 #2

dp wrote:
je***********@y ahoo.com wrote:
Hi

I'm trying to make an Iframe height adjustable depending on the height
of the web page.
I have managed to get this to work for the width, but not the height.

The original code is available here: http://www.brainjar.com/css/tabs/

This is what I have:

iframe.tabConte nt {
background-color: #99CCFF;
border: 1px solid #000000;
border-color: #0099CC #0099CC #0099CC #0099CC;
width: 100%;
height: 100%;
}

/*************** *************** *************** *************** *************** ***
* Additional styles.
*
*************** *************** *************** *************** *************** ***/

h4#title {
background-color: #003399;
border: 1px solid #000000;
border-color: #0099CC #0099CC #0099CC #0099CC;
color: #FFFFFF;
font-weight: bold;
margin-top: 0em;
margin-bottom: .5em;
padding: 2px .5em 2px .5em;
}

</style>
<script type="text/javascript">//<![CDATA[

function synchTab(frameN ame) {

var elList, i;

// Exit if no frame name was given.

if (frameName == null)
return;

// Check all links.

elList = document.getEle mentsByTagName( "A");
for (i = 0; i < elList.length; i++)

// Check if the link's target matches the frame being loaded.

if (elList[i].target == frameName) {

// If the link's URL matches the page being loaded, activate it.
// Otherwise, make sure the tab is deactivated.

if (elList[i].href == window.frames[frameName].location.href) {
elList[i].className += " activeTab";
elList[i].blur();
}
else
removeName(elLi st[i], "activeTab" );
}
}

function removeName(el, name) {

var i, curList, newList;

if (el.className == null)
return;

// Remove the given class name from the element's className property.

newList = new Array();
curList = el.className.sp lit(" ");
for (i = 0; i < curList.length; i++)
if (curList[i] != name)
newList.push(cu rList[i]);
el.className = newList.join(" ");
}

//]]></script>

Any ideas ??

Thanks :)

Looks ok here. FF 2.0, IE7

--
dp
Hmm..

I'm using IE 6 and I don't get the height !!
If I make the browser full size, The frame only fills half the page !

Nov 2 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
7621
by: Thomas | last post by:
Hi there, I have an iframe which is editable (designMode = "on") and want to resize it dynamically as the content grows (e.g. more lines of text is in there) and there the struggle starts. I fill the iframe with content (<body> tag and so on and also insert a <div> tag, inbetween is the content that should be modified). Now if the event "overflow" or "underflow" is triggered the iframe
2
5769
by: Brian Idzik | last post by:
I've successfully setup a xhtml 1.0 strict page with Mozilla & Netscape to display links in a toolbar into an internal <div id='content'> within the same document. The toolbar uses some javascript, but mostly CSS class & id elements. Mozilla & Netscape work fine handling the toolbar submenus & contents, but IE6 misbehaves on several areas. On loading the page, the target div (id='content') will not display. When a menu item is...
1
2465
by: UnderTaker | last post by:
Hi guys, I got a small problem which is driving me mad. I don't know if what I want to do is impossible or I am just overlooking something stupid, in both cases I hope you will answer me. I got a tableless 3 colums layout, container div is set to 100% height. First column (id="newsbox") too is 100% height and it as 2 div inside; first one(id="graphic"), is set with height on 350 pixel, second one (id="news") contains an iframe. The...
0
6077
by: Martin | last post by:
I understand that as of IE5.5 iframes respect the z-index style property. However I have noticed some odd behaviour when the iframe's src is set to an MHT web archive instead of an HTML file. For example: I have a DIV containing an IFRAME and an IMG, whose z-index is 1. I have a second, identical DIV except this one's z-index is set to 0. I would expect the first DIV (including the IFRAME and IMG) two be rendered above the second DIV....
3
1746
by: webguru | last post by:
I am trying to be able to pass a parameter in my URL to a subpage that will load the file specified in the paramater into an IFRAME. I have hardly used Javascript, and am trying to figure out how I would do this. My URL should always look like this: www.xxx.com/newsite/subpage.html?Page=filename.html The javascript I came up with looks like this, because I will only have one parameter and I know that with the ? and the = that the...
1
2593
by: j7.henry | last post by:
I am trying to pull specific data that is in a comma delimited file into a web page. So if my comma delimited file looks like: Name,Address,Zip Fred,123 Elm,66666 Mike,23 Jump,11111 I would like to be able to read this data and put each row into a variable? so I could display the values in a web page where I want.
0
7193
by: Tarik Monem | last post by:
I have been working on an all AJAX/DOM web site which is set to go live today and I thought I'd share my discoveries with all of you whom have helped me when I have encountered different issues along the way. First, deep linking is not something that a completely AJAX web site should be able to do by it's very nature of everything being on one page basically. So how can a person deep link to something that is on one page? This question...
0
7776
by: tequilamala | last post by:
I have an Iframe in one of the pages i am developing... the iframe is suppose to scroll up and down and the links target the iframe. the problem is that the iframe scrolls side to side on internet explorer but not on firefox. I dont want it to scroll sideways. in index.htm the iframe is at the bottom of the code. index.htm <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">...
0
9699
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9562
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10542
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10309
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10068
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7600
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6840
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4274
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2968
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.