473,396 Members | 1,940 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,396 software developers and data experts.

IFrame align="center" in Netscape and Firefox

Hi!

I'm trying to set the align property/attribute of an IFrame to center
but its not working (see below). Can anyone please tell me what's going
on, and if there's a work around for this?

Thanks,

- Olumide

/////////////////// code //////////////////

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>

<title>test</title>
</head>

<body>

<iframe src="sampleContent.htm" width="620" height="500"
align="center"></iframe>

</body>
</html>

Jul 23 '05 #1
2 1957
5...@web.de wrote:
Hi!

I'm trying to set the align property/attribute of an IFrame to center
but its not working (see below). Can anyone please tell me what's going on, and if there's a work around for this?

Thanks,

- Olumide

/////////////////// code //////////////////

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>test</title>
</head>

<body>

<iframe src="sampleContent.htm" width="620" height="500"
align="center"></iframe>

</body>
</html>


Use CSS, along with a proper doctype:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
<title>test</title>
<style type="text/css">

body {
text-align: center;
}
#foo {
display: block;
width: 620px;
height: 500px;
margin: 0 auto;
}

</style>
</head>
<body>
<iframe id="foo" src="sampleContent.htm"></iframe>
</body>
</html>

The body rule is for ie5win:

http://www.bluerobot.com/web/css/center1.html

Jul 23 '05 #2
50***@web.de wrote:
Hi!

I'm trying to set the align property/attribute of an IFrame to center
but its not working (see below). Can anyone please tell me what's going
on, and if there's a work around for this?


<SNIP>

Perhaps this is not Javascript?

Jul 23 '05 #3

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

Similar topics

14
by: Torbjørn Pettersen | last post by:
I get the following error: "You left off a required attribute of the indicated element. The most common such omitted attribute is the ALT attribute of the AREA or IMG element; browsers will...
1
by: 50295 | last post by:
Hi! I'm trying to set the align property/attribute of an IFrame to center but its not working (see below). Can anyone please tell me what's going on, and if there's a work around for this? ...
22
by: David. E. Goble | last post by:
Hi All; I have a few of these; sigsImages="sigs/finished1.jpg" sigsImages="sigs/foghorn.jpg" lower I have;
7
by: ALI-R | last post by:
Hi All, I have two user controls (header and footer) ,,which I've placed in an HTML Table in a page.I set the **align="center"** in the table and the table still is on the left side of the page...
11
by: Ben Amada | last post by:
Hello, When centering a block of HTML, in the past, I've always used: <div align="center"> ... </div> However, in VS 2005, I get the following warning: "Validation (XHTML 1.0...
4
by: Aaron Gray | last post by:
Whats the replacement for align="center" on a div ? Many thanks in advance, Aaron
0
by: CptJack | last post by:
I've been banging my head on this one for a while now, so maybe someone else can figure out what's wrong here. I have several tables throughout my site which are defined using: <asp:Table...
3
by: matwilko | last post by:
hi, i am trying to create a simple version of itunes...and i am using iframes to do this. I have already set up the iframes using dreamweaver and used a drop-down menu to select the genre. When...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.