473,624 Members | 2,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="sampleCont ent.htm" width="620" height="500"
align="center"> </iframe>

</body>
</html>

Jul 24 '05 #1
1 13415
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="sampleCont ent.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="sampleCont ent.htm"></iframe>
</body>
</html>

The body rule is for ie5win:

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

Jul 24 '05 #2

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

Similar topics

14
2816
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 typically use these to build a menu equivalent to your client-side image map if the user has disabled image loading, so you'll want to use a meaningful value here" Here's the code:
1
5537
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? Thanks, - Olumide
22
2520
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
4165
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 .How can I get the whole page(Table and its user controls) aligned in the center of my page? Thanks for your time in advance. Ali
11
25373
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 Transitional): Attribute 'align' is considered outdated. A newer construct is recommended."
4
1701
by: Aaron Gray | last post by:
Whats the replacement for align="center" on a div ? Many thanks in advance, Aaron
0
1136
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 ID="tbl1" runat="server" HorizontalAlign="center" CellPadding="0" CellSpacing="0"> ...plus the rest of the table. The tables center properly in the browser, but when I try to validate the site with the W3C validator at validator.w3.org I get: This...
3
2912
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 selecting the genre the artists appears in iframe1...and i want to be able to select the artist so that the songs appear. I am unsure of how to do this, could anybody help? Thanks Here is my current code... <html> <head> <title>MiTunes</title>...
0
8174
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8624
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8336
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,...
1
6111
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
5565
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
4082
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2607
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
1
1786
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1485
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.