Click to See Complete Forum and Search --> : centering an iframe


FromfromDave
02-05-2004, 02:50 PM
i am very new to web design and have picked up little about iframes. i need to know how to position them (center, left, etc.)

heres the original: <iframe name="content" src="anypage.html" width="750" height="400"></iframe>

also if theres a tutorial or a beginners html frames thing anywhere please let me know. i dont like to clog up msg. boards w/ newb questions.

thx for any help.

fredmv
02-05-2004, 02:57 PM
You can use CSS to align them quite easily. Since iframes are inline-level elements, meaning they can sit next to each other — as opposed to block-level elements that take up their own lines and cannot — you can use the CSS text-align property to align them however you want. Consider the following examples:<div style="text-align: left;">
<iframe></iframe>
</div><div style="text-align: center;">
<iframe></iframe>
</div><div style="text-align: right;">
<iframe></iframe>
</div>