473,326 Members | 2,136 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Problem with CSS not resizing form controls within IFRAMES

Ben
Hi,

I'm having trouble with the CSS apparently not working fully on the form
input fields when inside an iFRAME. The problem is that if I resize the
text size on the test.html page(see below) the controls inside the iframe do
not resize. However, if I view the source.html by itself I'm able to resize
both text and input box size.

I'm using IE 6.0, but this is also broken on Netscape 7.0 as well. Can
anyone think of work arounds that don't include removal of iframes? :)

Here's the simple HTML page:

test.html
<IFRAME
title=iFrame name=iFrame
src="source.html" frameBorder=0
width=560 height=500></IFRAME>
source.html
------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<LINK href="foo.css" type=text/css rel=stylesheet>
<table class="myBody" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="small">
Search Title
<select class="small-input" name="searchBy">
<option value="0" selected="selected">Item One</option>
<option value="1">Item Two</option>
<option value="2">Item Three</option>
</select>
<input class="small-input" name="searchValue" value="" type="text"
size="24">
</td>
</tr>
<tr>
<td class="small">This is an example of some small text</td>
</tr>
</table>

foo.css
-------
..myBody
{
background-color: #FFFFFF;
font-family:tahoma;
color:#000000;
padding-left:0px;
padding-right:0px;
padding-top:0px;
padding-bottom:2px;
text-align=left
}
..myBody .small-input
{
border: 1px solid #999999;
font-family:tahoma;
font-size:100%
}
Jul 20 '05 #1
5 5163
Ben wrote:
I'm having trouble with the CSS apparently not working fully on the form
input fields when inside an iFRAME. The problem is that if I resize the
text size on the test.html page(see below) the controls inside the iframe do
not resize. However, if I view the source.html by itself I'm able to resize
both text and input box size.

I'm using IE 6.0, but this is also broken on Netscape 7.0 as well. Can
anyone think of work arounds that don't include removal of iframes? :)


The iframe is a separate document so you will need to reference any
stylesheets in that document as well.

The stylesheet in the main document does not apply to the iframe.

--
Klaus Johannes Rusch
Kl********@atmedia.net
http://www.atmedia.net/KlausRusch/
Jul 20 '05 #2
Ben
Klaus,
As you can see from my original post in source.html I have the link to
the style sheet. Where are you suggestion I put the reference to the style
sheet? I believe I have it in the correct place where the CSS should be
rendered.

Thanks,
Ben

"Klaus Johannes Rusch" <Kl********@atmedia.net> wrote in message
news:2k*************@uni-berlin.de...
Ben wrote:
I'm having trouble with the CSS apparently not working fully on the form
input fields when inside an iFRAME. The problem is that if I resize the
text size on the test.html page(see below) the controls inside the iframe do not resize. However, if I view the source.html by itself I'm able to resize both text and input box size.

I'm using IE 6.0, but this is also broken on Netscape 7.0 as well. Can
anyone think of work arounds that don't include removal of iframes? :)


The iframe is a separate document so you will need to reference any
stylesheets in that document as well.

The stylesheet in the main document does not apply to the iframe.

--
Klaus Johannes Rusch
Kl********@atmedia.net
http://www.atmedia.net/KlausRusch/

Jul 20 '05 #3
> From: "Ben" <mo*****************@yahoo.com>
.myBody .small-input
{
border: 1px solid #999999;
font-family:tahoma;
font-size:100%
}


I believe that code has a mistake. You're supposed to have a comma, not
a space, between selectors that apply to the same group of styles.
See the following document:
http://www.w3schools.com/css/css_syntax.asp
in particular the following example:
h1,h2,h3,h4,h5,h6
{
color: green
}
Jul 20 '05 #4
On Sun, 08 Aug 2004 21:49:34 -0700, re*****@Yahoo.Com
<Ro********@YahooGroups.Com> wrote:
From: "Ben" <mo*****************@yahoo.com>
.myBody .small-input
{
border: 1px solid #999999;
font-family:tahoma;
font-size:100%
}


I believe that code has a mistake. You're supposed to have a comma, not
a space, between selectors that apply to the same group of styles.


As it stands, the above style applies to any element classed as
"small-input" which is a descendant of an element classed as "myBody".
Perhaps the OP intended this, I do not have the rest of the thread in my
newsreader.
Jul 20 '05 #5
Neal <ne*****@yahoo.com> wrote in news:opscf8btrs6v6656
@news.individual.net:
On Sun, 08 Aug 2004 21:49:34 -0700, re*****@Yahoo.Com
<Ro********@YahooGroups.Com> wrote:
From: "Ben" <mo*****************@yahoo.com>
.myBody .small-input
{
border: 1px solid #999999;
font-family:tahoma;
font-size:100%
}
I believe that code has a mistake. You're supposed to have a comma, not a space, between selectors that apply to the same group of styles.


As it stands, the above style applies to any element classed as
"small-input" which is a descendant of an element classed as "myBody".
Perhaps the OP intended this, I do not have the rest of the thread in

my newsreader.


Here is the code from the other post, so Robert is incorrect and Neal is
insightful:

<table class="myBody" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="small">
Search Title
<select class="small-input" name="searchBy"> ...

--
In a room with thirty-seven people, never have everybody shake each
other's hand.
Jul 20 '05 #6

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

Similar topics

5
by: Ben | last post by:
Hi, I'm having trouble with the CSS apparently not working fully on the form input fields when inside an iFRAME. The problem is that if I resize the text size on the test.html page(see below)...
1
by: khothikhe | last post by:
Can someone help me here because this is really killing me! the problem is, i have this javascript code in my aspx page that i want it to work on almost all browsers, especially opera and safari...
3
by: James Spibey | last post by:
Hi, I have an MDI application which has aboout 10 child windows. The way the app needs to work is that only one window should be visible at a time and it should be maximized within the parent...
8
by: Chris | last post by:
Hi, In design mode I built some windows with some controls (e.g. listboxes, labels, chgeck boxes etc.) in it, and I did set the property for the window size is set to normal. Now, when I run...
4
by: Thomas Richter | last post by:
Hi, I can't get of the black flicker when I resize my form. this = Mainform : System.Windows.Forms.Form If I set the size from 300 to 500 I see for ca 500ms some black areas. I try to solve it...
1
by: Benz. | last post by:
Hello all, I'm having a very strange problem. I've an MDI application with many child forms. In 1 of my Child forms (Say frmA), I've a few design time controls. The forms Autoscroll property is...
7
by: Dino Buljubasic | last post by:
Hi, I am using C# 2.0 (VS2005) to build my user control that contains a number of dynamically loaded ListViews. ListViewItems have their ForeColor properties set to either black or blue to...
1
by: Dave | last post by:
Usual apologies if this is old territory. I'm resizing a bunch of iframes on a page to the height of their contained documents. Some of the contained documents contain IMG tags. On IE this...
1
helpmepls
by: helpmepls | last post by:
i have a site where I have an iframe mainFrame which loads page content from the main menu (top horizontal menu). within this mainFrame is a second menu to left specific to the loaded page, and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.