This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > July 2007 > How to make different value per browser?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How to make different value per browser?
Bob

2007-07-20, 6:21 am

Hi at all

I'ld like to make different values of the position and top property one per
browser.

I.e.

duv#fixed{

position:fixed !important; //firedfox

top:30%; //firefox

left:25%; //firefox

position:relative; /MSIE

top:-200px; //msie

}

How can I do to apply the top:-200; only to MSIE and the top:25% only to FF
or the left:30% only to FF?

Best regards


Andy Dingley

2007-07-20, 6:21 am

On 20 Jul, 10:24, "Bob" <b...@nospam.com> wrote:

> I'ld like to make different values of the position and top property one per
> browser.


Then stop wanting that. It's a disgusting perversion and you should be
ashamed, not talking about it in public.

If you _think_ that you need it, because otherwise "browsers show
things too differently", then you're addressing the wrong problem.

* If you do things right, they won't vary too much (for typical
requirements requested of typical browsers)

* If they do still vary, that's not a big deal. The user context
(screen size, user defaults, OS, even the browser) will all affect
things to some small extent. We have to work around this by being
"fluid" with our designs and producing pages that "work" in these
different contexts, not trying to slavishly maintain an unachievable
and fundamentally pointless narrow consistency.


If you still insist, then use IE conditional comments (JFGI). They're
the cleanest of the ugly hacks for achieving this.

Bergamot

2007-07-20, 6:17 pm

Bob wrote:
>
> I'ld like to make different values of the position and top property one per
> browser.
> top:30%; //firefox
> top:-200px; //msie


It is very likely you are fixing the wrong problem by doing this. You
need to resolve the cause of the positioning difference instead.

Are you triggering quirks mode in IE, which causes it to use a broken
box model and mangle positioning? We can't know, or suggest a better
solution, without seeing the web page in question.

Post a URL. Do not post code.

--
Berg
Andreas Prilop

2007-07-20, 6:17 pm

On Fri, 20 Jul 2007, Bob wrote:

> I'ld like to make different values of the position and top property
> one per browser.


That's like telling some browsers to sit in the back of the bus.

--
In memoriam Alan J. Flavell
http://groups.google.com/groups/sea...:Alan.J.Flavell
Bob

2007-07-20, 6:17 pm

"Bergamot"

wrote

> Post a URL. Do not post code.
>
> --
> Berg




The CROSSBROWSER <div> that I want to do is like the <duv> that appair into
this page


http://www.dpopup.com/

Best regards

(at all)




Jonathan N. Little

2007-07-20, 6:17 pm

Bob wrote:
> "Bergamot"
>
> wrote
>
>
>
>
> The CROSSBROWSER <div> that I want to do is like the <duv> that appair into
> this page
>
>
> http://www.dpopup.com/
>


Are you talking about that sliding popup they use to get you to download
something? It done with JavaScript really. If you want to do it,
download their script.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Andy Dingley

2007-07-20, 6:17 pm

On 20 Jul, 15:19, Andreas Prilop <Prilop2...@trashmail.net> wrote:

> That's like telling some browsers to sit in the back of the bus.


....and IE's only on a short bus to start with.

Bergamot

2007-07-20, 6:17 pm

Bob wrote:
>
> The CROSSBROWSER <div> that I want to do is like the <duv> that appair into
> this page
> http://www.dpopup.com/


If you want to do what they do on that page, then do as Mr Little says
and download their script.

If you have made your own attempt at it, then post the URL for that page
and maybe we can help you with your code. If you can't do that, then we
can't help you.

--
Berg
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews