TomT
04-16-2009, 09:54 PM
1) Script Title:
Ajax Tabs Content script v2.2
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/
3) Describe problem:
I've set up a simple 4 tab layout. This looks fine in Firefox 3, but in IE7 the height of the iframe is a lot smaller.
Is there anyway to get the iframe the same height and width in IE & Firefox ??
Here is my test code:
index.htm
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="ajaxtabs/ajaxtabs.css" />
<script type="text/javascript" src="ajaxtabs/ajaxtabs.js"></script>
</head>
<body>
<ul id="countrytabs" class="shadetabs">
<li><a href="1.php" rel="#iframe">1</a></li>
<li><a href="2.php" rel="#iframe">2</a></li>
<li><a href="3.php" rel="#iframe">3</a></li>
<li><a href="4.php" rel="#iframe">4</a></li>
</ul>
<div id="countrydivcontainer" style="border:1px solid gray; width:1000px; margin-bottom: 1em; padding: 10px"></div>
<script type="text/javascript">
var countries=new ddajaxtabs("countrytabs", "countrydivcontainer")
countries.setpersist(true)
countries.setselectedClassTarget("link") //"link" or "linkparent"
countries.init()
</script>
</body>
</html>
This is my ajaxtabs.css
/* ######### CSS for Shade Tabs. Remove if not using ######### */
.shadetabs{
padding: 3px 0;
margin-left: 0;
margin-top: 1px;
margin-bottom: 0;
font: bold 12px Verdana;
list-style-type: none;
text-align: left; /*set to left, center, or right to align the menu as desired*/
}
.shadetabs li{
display: inline;
margin: 0;
}
.shadetabs li a{
text-decoration: none;
position: relative;
z-index: 1;
padding: 3px 7px;
margin-right: 3px;
border: 1px solid #778;
color: #2d2b2b;
background: white url(shade.gif) top left repeat-x;
}
.shadetabs li a:visited{
color: #2d2b2b;
}
.shadetabs li a:hover{
text-decoration: underline;
color: #2d2b2b;
}
.shadetabs li a.selected{ /*selected main tab style */
position: relative;
top: 1px;
}
.shadetabs li a.selected{ /*selected main tab style */
background-image: url(shadeactive.gif);
border-bottom-color: white;
}
.shadetabs li a.selected:hover{ /*selected main tab style */
text-decoration: none;
}
Thanks in advance. :)
Ajax Tabs Content script v2.2
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/
3) Describe problem:
I've set up a simple 4 tab layout. This looks fine in Firefox 3, but in IE7 the height of the iframe is a lot smaller.
Is there anyway to get the iframe the same height and width in IE & Firefox ??
Here is my test code:
index.htm
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="ajaxtabs/ajaxtabs.css" />
<script type="text/javascript" src="ajaxtabs/ajaxtabs.js"></script>
</head>
<body>
<ul id="countrytabs" class="shadetabs">
<li><a href="1.php" rel="#iframe">1</a></li>
<li><a href="2.php" rel="#iframe">2</a></li>
<li><a href="3.php" rel="#iframe">3</a></li>
<li><a href="4.php" rel="#iframe">4</a></li>
</ul>
<div id="countrydivcontainer" style="border:1px solid gray; width:1000px; margin-bottom: 1em; padding: 10px"></div>
<script type="text/javascript">
var countries=new ddajaxtabs("countrytabs", "countrydivcontainer")
countries.setpersist(true)
countries.setselectedClassTarget("link") //"link" or "linkparent"
countries.init()
</script>
</body>
</html>
This is my ajaxtabs.css
/* ######### CSS for Shade Tabs. Remove if not using ######### */
.shadetabs{
padding: 3px 0;
margin-left: 0;
margin-top: 1px;
margin-bottom: 0;
font: bold 12px Verdana;
list-style-type: none;
text-align: left; /*set to left, center, or right to align the menu as desired*/
}
.shadetabs li{
display: inline;
margin: 0;
}
.shadetabs li a{
text-decoration: none;
position: relative;
z-index: 1;
padding: 3px 7px;
margin-right: 3px;
border: 1px solid #778;
color: #2d2b2b;
background: white url(shade.gif) top left repeat-x;
}
.shadetabs li a:visited{
color: #2d2b2b;
}
.shadetabs li a:hover{
text-decoration: underline;
color: #2d2b2b;
}
.shadetabs li a.selected{ /*selected main tab style */
position: relative;
top: 1px;
}
.shadetabs li a.selected{ /*selected main tab style */
background-image: url(shadeactive.gif);
border-bottom-color: white;
}
.shadetabs li a.selected:hover{ /*selected main tab style */
text-decoration: none;
}
Thanks in advance. :)