How to Float iFrames
The CSS "float" attribute works similarly to the HTML "align" attribute. If you have embedded an object with an iframe, you can use the CSS (Cascading Style Sheets) float attribute to align an image, frame or element to the left or right. CSS attributes are not specific to iframes; you can use them to style nearly any code. The float attribute does not inherently support centering.The iframe tag is used to embed scripts from other Web pages. You may need to use it to insert a Facebook "Like" button or other Web elements.
Instructions
-
-
1
Open the Web document or file containing the iframe to access the iframe code.
-
2
Type the following code between the opening and closing tags:
style="float:right"
-
-
3
Examine the iframe code to verify that the syntax is correct. The full code should now look similar to this:
<iframe src="/default.asp" width="200" height="200" style="float:right">custom-code-or-text</iframe>
-
4
Change the "float" value to "left" if you'd prefer to float the image to the left instead of the right. Save the changes to the file or Web document.
-
1
Tips & Warnings
If you're using a content management system like WordPress, Joomla! or Drupal, you'll need to access your server's files to open the Web document containing the iframe.