Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

IFrame and table alignment

Posted on 2003-11-12
3
Medium Priority
?
2,262 Views
Last Modified: 2007-12-19
I am trying to use IFRAME in a ASP.Net page. Question has nothing to do with ASP.Net controls or anythng.

Design
---------
1.I need 2 frames on the page.
2. Both need to aligned side by side not stacked.
3. The left frame wil have table (rows and columns) with static text and can't be scrolled.
4. Right frame will have lot of columns corresponding to each row in left frame and will be scrollable (horizontal only).

Problem
----------

1. How do you make the two frames grow to the size of the table so that all rows are visible. By default IFrame shows up as small rectangle. So I tried to set the height to 100%. But that does not work because the content my be more than height of the browser window.
2. The top two rows in left frame will have no content whereas rows in right frame has images in top two rows with images. I know the max height of the content in rows in right frame. How do I communicate this height value to left frame. The height information will be known after all  data has been processed for right frame.
3. The right frame can have horizontal scroll bar where as left frame can't have. How do I align the two frames such that all rows are aligned to rows in left frame.

If you can provide me with some working javascript code or something, that will be great.

Let me know if you need more information.

thanks,


0
Comment
Question by:naveenkohli
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 5

Expert Comment

by:prohacx
ID: 9738854
Hi there!

When trying this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> iframe test </TITLE>
</HEAD>

<BODY>

<iframe id="ifrm1" scrolling="no" style="border: 2px solid red; width: 150px; margin: 0px; padding: 5px;"></iframe>

<iframe id="ifrm2" scrolling="yes"  style="border: 2px solid blue; width: 300px; margin: 0px; padding: 5px;"></iframe>

</BODY>
</HTML>

I get 2 iframes next to eachother, with the right one having a scrollbar.

This should get you on your way...
0
 
LVL 23

Author Comment

by:naveenkohli
ID: 9740557
I am already on the way.... Using IFrame is not an issue for me. I am more interested in the alignment probelm solution.
I don't want to use fixed width/height, the way you have mentioned in your example.
0
 
LVL 5

Accepted Solution

by:
prohacx earned 2000 total points
ID: 9745854
O.K.,

let me know if you need something else...

If you really want the iframes next to eachother, use a table with 2 columns and 1 iframe in each of them. That way the iframes will always be next to eachother. You can also use display:inline in the style attribute, but this will wrap if the browser is too small.

Bye!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question