CSS simple question?

H

hzgt9b

Using CSS I want to center a DIV on the page and always keep it 3px
from the top. Seems simple but I cannot find a cross-browser solution
to this problem. I can get to work in IE or FF but not both w/o
relaxing the 3px from the top constraint. Can someone offer a solution
to this problem?
 
T

Travis Newbury

Using CSS I want to center a DIV on the page and always keep it 3px
from the top. Seems simple but I cannot find a cross-browser solution
to this problem. I can get to work in IE or FF but not both w/o
relaxing the 3px from the top constraint. Can someone offer a solution
to this problem?

With out a URL to see what you are doing I will just have to guess
what you code looks like. So I say you are missing a ":" in the CSS.

Any one else want to take a guess?
 
D

dorayme

"Beauregard T. Shagnasty said:
Three pixels, eh?
http://www.positioniseverything.net/explorer/threepxtest.html ?

But as you say, Travis, without a URL to the page, everything is a
guess.

I'll bite. If it is a vertical margin, I would say to make sure
you zero margins and paddings, up to but not necessarily as
drastic as

* {margin: 0; padding:0;}

and then set explicit margins and that way you will increase your
chances of browsers behaving similarly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top