Jump to content


centering


  • You cannot reply to this topic
3 replies to this topic

#1 xunhandmex

    Young Padawan

  • Members
  • Pip
  • 44 posts

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 adam123

    Retired P2L Staff

  • Members
  • PipPipPipPip
  • 2,306 posts
  • Location:London, UK
  • Interests:Programming and stuff.

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.

#3 maansson

    Young Padawan

  • Members
  • Pip
  • 132 posts
  • Gender:Male
  • Location:Lund, Sweden
  • Interests:Hmm, not much for Photoshop. Havn't taking time to learn it yet. Use Fireworks to the graphical area. More into coding and stuff. PHP, CSS, Java and of course HTML.

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...
<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 xunhandmex

    Young Padawan

  • Members
  • Pip
  • 44 posts

Posted 05 April 2005 - 05:32 PM

awsome thanks guys





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users