Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

terrorcrew

macrumors newbie
Original poster
Jun 4, 2008
3
0
Desert, Ca
Ok so im having issues aligning an iframe to center in Dreamweaver CS3. Left and right work great, but it wont center. Any ideas why??

heres the code.

<iframe src="iframe.html" name="iframe" width="592" height="400" align="center" scrolling="auto" id="iframe" allowtransparency="true" application="true"></iframe>

Thanks!
 
You may need to drop it into a div and use CSS to center the thing.

An easier, albiet dated, method would be to use tables and horizontally aline the table to center.
 
The align="center" only applies to things placed inside the iframe. Using CSS you can add a margin property like so,
Code:
iframe {
 margin: 0 auto;
}
This'll at least work for browsers other than IE.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.