Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8693793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:37:31+00:00 2026-06-13T00:37:31+00:00

I have an iframe; That points to a .php file and I need the

  • 0

I have an iframe;

That points to a .php file

and I need the image which is echo’ed to be centred in the iframe.
All the images are 960px width, but the iframe width needs to be 100% as it will not always be as wide (some pages that it sits on may be 600px wide).

Any advise would be greatly appreciated.

PHP

Untitled Document

/* ~~ Element/tag selectors ~~ */
ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding     
and margin on lists. For consistency, you can either specify the amounts you want here,     
or on the list items (LI, DT, DD) they contain. Remember that what you do here will     
cascade to the .nav list unless you write a more specific selector. */
    padding: 0;
    margin: 0;
}
h1, h2, h3, h4, h5, h6, p {
    margin-top: 0;   /* removing the top margin gets around an issue where margins can     
escape from their containing div. The remaining bottom margin will hold it away from     
any elements that follow. */
    padding-right: 15px;
    padding-left: 15px; /* adding the padding to the sides of the elements within the     
divs, instead of the divs themselves, gets rid of any box model math. A nested div with 
side padding can also be used as an alternate method. */
}
a img { /* this selector removes the default blue border displayed in some browsers     
around an image when it is surrounded by a link */
    border: none;
}
/* ~~ Styling for your site's links must remain in this order - including the group of          

selectors that create the hover effect. ~~ */
a:link {
    color: #42413C;
    text-decoration: underline; /* unless you style your links to look extremely     
unique, it's best to provide underlines for quick visual identification */
}

a:visited {
    color: #6E6C64;
    text-decoration: underline;
}
a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator     
the same hover experience as the person using a mouse. */
    text-decoration: none;
}

/* ~~ this fixed width container surrounds all other elements ~~ */
.container {
    width: 100%; /* the auto value on the sides, coupled with the width, centers the     
layout */
    height: 100px;
    margin-top: 0;
    margin-right: auto;
    margin-bottom: 0;
    margin-left: auto;
}

/* ~~ This is the layout information. ~~ 

1) Padding is only placed on the top and/or bottom of the div. The elements within this     
div have padding on their sides. This saves you from any "box model math". Keep in 
mind, if you add any side padding or border to the div itself, it will be added to the     
width you define to create the *total* width. You may also choose to remove the padding     
on the element in the div and place a second div within it with no width and the     
padding necessary for your design.

*/
.content {
    padding: 10px 0;
    text-align: center;
}

/* ~~ miscellaneous float/clear classes ~~ */
.fltrt {  /* this class can be used to float an element right in your page. The floated     
element must precede the element it should be next to on the page. */
    float: right;
    margin-left: 8px;
}
.fltlft { /* this class can be used to float an element left in your page. The floated     
element must precede the element it should be next to on the page. */
    float: left;
    margin-right: 8px;
}
.clearfloat { /* this class can be placed on a <br /> or empty div as the final element 
following the last floated div (within the #container) if the overflow:hidden on the 
.container is removed */
    clear:both;
    height:0;
    font-size: 1px;
    line-height: 0px;
}    
    -->
</style></head>

<body>

<div class="container">
  <div class="content">
    <?php
//Sample Database Connection Syntax for PHP and MySQL.
//Connect To Database
$hostname="localhost";
$username="";
$password="";
$dbname="carbonmarketing";
$usertable="ClientList";
$advertfooter = "advertfooter";
mysql_connect($hostname,$username, $password) or die ("    
<html>%MINIFYHTML4333ddb1f6ba50276851b9f9854a5c817%</html>");
mysql_select_db($dbname);
# Check If Record Exists
$query = "SELECT * FROM $usertable
          WHERE region IN ('WW','EU','UK')          
          ORDER BY RAND() LIMIT 1";
$result = mysql_query($query);
if($result)
{
while($row = mysql_fetch_array($result))
{
$advertfooter = $row["$advertfooter"];
echo "$advertfooter";

}
}
?>
  </div>
</div>
</body>
</html>

Iframe

<iframe src="http://www.CARBONYZED.com/Marketing/UK-Advert_Footer.php" 
style="border:0px  hidden;" name="CARBONMarketingFooter" scrolling="no" frameborder="0" 
marginheight="0px" marginwidth="0px" height="100px" width="100%"></iframe>

Thanks

Henry

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T00:37:32+00:00Added an answer on June 13, 2026 at 12:37 am

    Dirty way

    .content a {
        position: absolute;
        left: 50%;
        margin-left: -480px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an iframe which lets say that it contains the following text: <h1>
Background I have a basic HTML page with an iframe that points to a
I have an iframe Facebook application that uses the Facebook PHP SDK to authenticate
I have an iframe to embed audio which points to a src like this...
I have an iframe on a page called Test.aspx that points to a url
I have an <iframe> whose src points to a plain text file (not HTML).
I have a page P1 loading from site S1 which contains an iframe. That
I have a page that contains an iFrame point to a URL with parameters.
I have an iframe that looks like this: <iframe id=iframe2 ...> #document <html>...</html> </iframe>
I have a iframe that i want to open pdf's into from a list

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.