Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

93 users online



CSS/div FAQ

CSS/div FAQ

Currently viewing this thread: 1 (0 members and 1 guests)


Page 3 out of 3
Krigu

Krigu

I'm a mean sonuvabitch
Status: Offline!

Re: CSS/div FAQ

Quote:

Originally posted by Radley
How do I horizontally center a div?
The code is relatively simple.

Code:


/* body can be replaced with the
parent of the object you want to center */
body {
text-align: center; /* IE5.x/Win fix */
}

#center {
text-align: left; /* reset text aligning */
margin: 0 auto; /* the correct way */
/* you can modify the top and bottom margins, just leave left and right to auto */
}


Doesn't work for Mozilla FireFox...: http://zovaag.nl/mirrors/raf/

___________________

Really Smile do Smile smiles Smile make Smile your Smile posts Smile less Smile retarded?

Kryptonite

Kryptonite

Lord British
Status: Offline!
Quote:

Originally posted by Krigu
Doesn't work for Mozilla FireFox...: http://zovaag.nl/mirrors/raf/

I don't see "margin: 0 auto;" anywhere in your code. Try again, and maybe read this time.

___________________

PurePhotoshop Forums

Krigu

Krigu

I'm a mean sonuvabitch
Status: Offline!

Sorry, my bad, didn't think it'd be of much importance to this matter.
However, I've fixed it using the WPDFD technique, which seems to work quite well.

Appologies.

___________________

Really Smile do Smile smiles Smile make Smile your Smile posts Smile less Smile retarded?

freak

freak

Neverside Newbie
Status: Offline!
Quote:

Originally posted by Krigu
Sorry, my bad, didn't think it'd be of much importance to this matter.


How'd you come to that conclusion, when, right after margin: 0 auto; is the following comment?

Code:

/* the correct way */

___________________

Tables for layout is an abuse. -- Internet Explorer is unsafe.

Page 3 out of 3
Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0074 seconds.