CSS simple question?

CSS simple question?

am 21.11.2007 16:12:03 von 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?

Re: CSS simple question?

am 21.11.2007 16:28:10 von TravisNewbury

On Nov 21, 10:12 am, hzgt9b wrote:
> 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?

Re: CSS simple question?

am 21.11.2007 17:16:55 von a.nony.mous

Travis Newbury wrote:

> wrote:
>> 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?

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

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

--
-bts
-Motorcycles defy gravity; cars just suck

Re: CSS simple question?

am 21.11.2007 22:17:50 von dorayme

In article
,
"Beauregard T. Shagnasty" wrote:

> Travis Newbury wrote:
>
> > wrote:
> >> 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?
>
> Three pixels, eh?
> http://www.positioniseverything.net/explorer/threepxtest.htm l ?
>
> 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.

--
dorayme