CSS simple question?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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?

Re: CSS simple question?

Quoted text here. Click to load it

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?

Re: CSS simple question?

Travis Newbury wrote:

Quoted text here. Click to load it

Three pixels, eh?
http://www.positioniseverything.net/explorer/threepxtest.html ?

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

   -Motorcycles defy gravity; cars just suck

Re: CSS simple question?

In article

Quoted text here. Click to load it

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.


Site Timeline