473,795 Members | 2,863 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I cannot get two iframes to sit side-by-side. Nor in the dimentions I want them in.

Screaming Eagle
4 New Member
I haven't recieved any information that I could use, and researching this issue hasn't turned up any worthy results. Hence my reposting. Since I have had no reply, and my associates wish to move things along, I have been forced to use regular frames for the site (which works fine, but visually its not what I'd like to produce). Ideally, I would like to fix this problem I currently have with iframes, and do without using regular frames. If anyone needs more information, don't hesitate to ask.

Here is my original text:

Ok, so some associates and I are building a website, and I'm in charge of the design and layout. I've decided to go with a simple navigation bar on top contained in its own div. Under the navigation bar, I have two iframes contained in one div and each iframe in its own inside the container div. In theory it was supposed to have shown the user statistics to the left at a width of 160 pixels and lowered from the top at 73 pixels. That displays fine.

Where everything falls apart is when the second iframe: "iframemain " (which should show up right next to the first) appears beneaththe user statistics iframe, and at the same dimentions as the user statistics iframe; I simply want it to take up the rest of the screen with my "iframemain ".

This problem seems to happen on both IE6 and Firefox

I have tried not having a container div around both; I've removed the html height/width elements that I had previously placed in the body of the code; I've played around with height and width in the CSS coding as well; I taken away absolute postions, and as you can see, I've made the user div inline. I'm pretty much stumped as to what I'm missing here. Can anyone give me a pointer?

This is my CSS code:


[
Expand|Select|Wrap|Line Numbers
  1. ]
  2. body {font-size:8pt}
  3.  
  4. hr  {color:black}
  5.  
  6. p.img {font:8pt; color:black}
  7.  
  8. a.reg:link,a.reg:visited,a.reg:active       {font:6pt; color:black; text-decoration:none}
  9. a.reg:hover     {font:6pt; color:black; text-decoration:underline}
  10.  
  11. th,tr,td   {color:black; font-size:8pt}
  12.  
  13. table.one   {table-layout:auto; border-collapse:separate;
  14.     empty-cells:show; border-color:white;
  15.     border-style:none; padding:0; margin:0}
  16.  
  17. div.main {float:left; border:1px; overflow:hidden;
  18.     left:0px; top:0px; padding:0; margin:0}
  19.  
  20. div.wb1 {float:left; background-color:white; 
  21.     width:325px; height:390px; z-index:0}
  22.  
  23. div.background  {float:left; left:0px; top:0px;
  24.     padding:0; z-index:-1}
  25.  
  26. div.nav {float:left; height:70px; border:1px; border:solid; 
  27.     border:black; left:1px; top:1px; padding:0}
  28.  
  29. div.contain {float:left; width:100%; padding:0; margin:0}    
  30.  
  31. div.user {float:left; width:160px; 
  32.     border:1px; border:solid; border:black;
  33.     left:1px; top:73px; padding:0; display:inline}
  34.  
  35. div.iframemain {float:left; top:73px; left:163px;
  36.     padding:0}
  37.  
  38. img.background1  {left:0px; top:0px; z-index:-1}
  39.  
  40. img.background2 {margin-left:20%}
  41.  
  42. [
]
This is my xhtml code:


[
Expand|Select|Wrap|Line Numbers
  1. ]
  2. <div class="nav">
  3.       <!-- THE NAVBAR!-->
  4.       <table class="one" style="margin-left:350px" cellpadding="5">
  5.         <tr>
  6.           <td><a class="reg" href="nav1.htm" target="actframe">Nav choice1</a></td>
  7.           <td><a class="reg" href="area.htm" target="actframe">Nav choice2</a></td>
  8.           <td><a class="reg" href="nav2.htm" target="actframe">Nav choice3</a></td>
  9.           <td><a class="reg" href="nav3.htm" target="actframe">Nav choice4</a></td>
  10.           <td><a class="reg" href="nav4.htm" target="actframe">Nav choice5</a></td>
  11.           <td><a class="reg" href="nav5.htm" target="actframe">Nav choice6</a></td>
  12.         </tr>
  13.         <tr>
  14.           <td><a class="reg" href="nav6.php" target="actframe">Nav choice6</a></td>
  15.           <td><a class="reg" href="nav7.htm" target="actframe">Nav choicel8</a></td>
  16.           <td><a class="reg" href="nav8.htm" target="actframe">Nav choice9</a></td>
  17.           <td><a class="reg" href="http://www.mywebsite.net/forums/" target="_blank">Forums</a></td>
  18.           <td><a class="reg" href="bugreport.htm" target="actframe">Bug Report</a></td>
  19.           <?php
  20.  
  21.           if($usertype == "Admin")
  22.           {
  23.           echo "<td><a class=\"reg\" href=\"admin.php\" target=\"actframe\">Admin</a></td>";
  24.           }
  25.  
  26.           ?>
  27.         </tr>
  28.       </table>
  29.     </div>
  30.  
  31.     <div class="contain">
  32.  
  33.       <div class="user">
  34.         <!--this contains a separate page on the left of the screen for user statistics-->
  35.         <iframe src="user.php" name="showframe" frameborder="0" />
  36.       </div>
  37.  
  38.       <div class="iframemain">
  39.         <!--this is where the user should see all of the links appear when clicked-->
  40.         <iframe src="area.htm" name="actframe" frameborder="0" />
  41.       </div>
  42.  
  43.  
  44.     </div>
  45.  
  46.   </body>
  47.  
  48.   <frameset>
  49.     <frame src="area.htm" name="actframe"/>
  50.   </frameset>
  51. [
]
Sep 6 '07 #1
0 1582

Sign in to post your reply or Sign up for a free account.

Similar topics

10
3939
by: maxim vexler | last post by:
I'm reading a lot of talks lately about the term iFrame and with your permission would like to ask a few question about that : - what is iFrame, i mean what is it good for ? - does all the popular browsers support it (mostly mozilla & the much hated IE, google says the do but nothing is better that experienced answer) - iFrames replaces the old frames once used in html to show a number of pages in a single windows, right ? - what are...
4
10310
by: nc | last post by:
My iterator can find my collection when my Action class calls my jsp directly, however when my Action class calls an html file that is set up with IFrames (one of which is loading that same jsp), I get a servlet error "cannot find collection". Not usre if my issue is HTML, JSP, WebSphere or ??? Any help is very much appreciated. HTML file: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
0
2101
by: Dan Popa | last post by:
Check out the following 2 links: http://www.batisdev.com/admin/test_1images.asp http://www.batisdev.com/admin/test_2images.asp First page contain 4 IFRAMES and 1 IMG tags. Second page contain 4 IFRAMES and 2 IMGs tags. The problem is that the second IFRAME from the second page generates fires a new session.
1
1686
by: Nick Tew | last post by:
Hello, This relates to the previous post i've left. This problem is do with the browser's back and forward buttons. When clicked, can it be made to affect any history NOT in the iframes. Therefore only going backwards and forwards through the pages history; leaving the iframes as they are. Any help would be great.
6
7115
by: adnanx82 | last post by:
Hi, I was wondering if anyone knew how to perform the following 2 tasks in Javascript: 1) distinguish between frames and iframes (during an onload event for example) 2) figure out whether a container page has finished loading completely with all its component frames or iframes (onload event is not useful because we have more than one onload, and container page onload is not
5
2234
by: Frances | last post by:
I need to replace iframes acc. to what option user chooses in a sel obj.. but figured have to load a blank iframe when pg loads so I can replace it.. (iframe gets put in a pre-existing div..) this is approach.. I'm having some problems and would appreciate some help.. thank you very much... var selItem; var ifrCurr; var div = document.getElementById("divPricing"); // this var not being read inside functions..
2
2789
by: dh | last post by:
How can a button that resides on the Main page tell the child Iframes to redirect without the page posting back? I keep getting a javascript error: "frames.iframe1 is null or not an object." I'm assuming this is because when i press the button it reloads the page and the frames can't be referenced. here's a simple example: <HTML> <script language="C#" runat="server">
2
2096
by: Guadala Harry | last post by:
1. Are IFrames supported only in uplevel versions of IE? If not IE exclusively, what browsers support IFrames? 2. Are IFrames going to be supported in the future - as far as anyone knows - or have they been deprecated and will no longer be supported in the future? Please note that I'm *not* asking for opinions on the merits of using IFrames or IFrames vs regular framesets or any other such...
4
2268
by: Alex D. | last post by:
Hi guys. I have two nestes IFRAMES in one of my pages. The main page has an Iframe that points to an aspx page, this page has another Iframe that points to a regular html file. My problem is when resizing the IE window I loose the inner Iframe, it disappears for some reason. Any ideas?? Thanks a lot, Alex.
2
12948
by: ericisjusteric | last post by:
I have a page with multiple iframes and need to have the user (ie6) be able to click a button to refresh any one of the iframes - but also to click another button at the top of the page to refresh all of them - from the server (this could be on page refresh also) as the purpose is to reset the iframe to the original content in case the user clicked on a link in that iframe and changed it, but also in case there were updates to the original page...
0
10443
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...
1
10165
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10002
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
7543
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
6783
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();...
0
5565
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
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
2
3728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2921
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.