centering
Started by xunhandmex, Apr 04 2005 09:21 PM
3 replies to this topic
#1
Posted 04 April 2005 - 09:21 PM
how do you center the page? so its not off to the right or left of the page? but in the center? and where would i put it? also... with iframes how do you get it so that i can make the background of the iframe transparent or better yet anyone know how to make a iframe with PHP that way its also more compatable. thanks
#2
Posted 05 April 2005 - 02:50 AM
To center the whole page, Put <div align="center"> in font of your code. E.g
<!-- Your html and header code goes here -->
<body>
<div align="center">
<!-- all your body crap -->
</div>
Dunno about the iframe thing.
<!-- Your html and header code goes here -->
<body>
<div align="center">
<!-- all your body crap -->
</div>
Dunno about the iframe thing.
#3
Posted 05 April 2005 - 08:05 AM
There are several ways og dealing with centering a page. Adam said one, and it works fine. Here are two others...
If you are working with only div's, just place
If I were you, I'd go with my first suggestion. It's often the best.
To the iframe problem, some opacity should solve it. Try read this page www.quirksmode.org. I googled for it so it's really easy to find. Just apply it to the background in your iframe.
Sincerily yours,
maansson
<table align="center"><tr><td> //Just add align="center" to the table. All your site content here </td></tr></table>Well, now you just say that this way takes a lot more code, but you probably already have a table at the top of your site. Just place align="center", and voila!
If you are working with only div's, just place
body {
margin: 0px auto
}
in your stylesheet document. Warning. This will not give you your wish result in Internet Explorer if I'm not misstaken. But there are ways of walking around that problem. (Check point 7 on this site). If I were you, I'd go with my first suggestion. It's often the best.
To the iframe problem, some opacity should solve it. Try read this page www.quirksmode.org. I googled for it so it's really easy to find. Just apply it to the background in your iframe.
Sincerily yours,
maansson
#4
Posted 05 April 2005 - 05:32 PM
awsome thanks guys
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
