By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,747 Members | 1,672 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,747 IT Pros & Developers. It's quick & easy.

Surely a FAQ - FF and MSIE

P: n/a
We are trying to create a stylesheet that works both for FF and MSIE. I've
been googling a bit yesterday and found some hints (like using #margin-left
or _margin-left for MSIE) but it seems these are outdated, as they also
affect FF.

This must be a FAQ (anyone with the address to it?) but how do I write
margin-top: -40px;
margin-left: 170px;
so FF actually uses both directions while MSIE ignores the margin-left
instruction? As above

margin-top: -40px;
margin-left: 170px;
#margin-left: 0px;
_margin-left: 0px;

Does affect FF.

--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access
Oct 3 '08 #1
Share this Question
Share on Google+
10 Replies


P: n/a
Martin wrote:
We are trying to create a stylesheet that works both for FF and MSIE. I've
been googling a bit yesterday and found some hints (like using #margin-left
or _margin-left for MSIE) but it seems these are outdated, as they also
affect FF.

This must be a FAQ (anyone with the address to it?) but how do I write
margin-top: -40px;
margin-left: 170px;
so FF actually uses both directions while MSIE ignores the margin-left
instruction? As above

margin-top: -40px;
margin-left: 170px;
#margin-left: 0px;
_margin-left: 0px;

Does affect FF.
Google for "Conditional Comments".

Oct 3 '08 #2

P: n/a
C A Upsdell wrote:
Google for "Conditional Comments"
OK, so if I use those IE will ignore other statements on the page? It's not
entirely clear from the few pages I browsed just now that in

<!?[if IE 6]>
<link href=?../ie6.css? rel=?stylesheet? ???. />
<![endif]?>
<link href=?../ff.css? rel=?stylesheet? ???. />

IE will ignore the ff.css. I suppose so, but can anyone confirm?

--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access
Oct 3 '08 #3

P: n/a
In article <48***********************@news.newsdemon.com>,
Martin <sh********@gmail.comwrote:
C A Upsdell wrote:
Google for "Conditional Comments"

OK, so if I use those IE will ignore other statements on the page? It's not
entirely clear from the few pages I browsed just now that in

<!?[if IE 6]>
<link href=?../ie6.css? rel=?stylesheet? ???. />
<![endif]?>
<link href=?../ff.css? rel=?stylesheet? ???. />

IE will ignore the ff.css. I suppose so, but can anyone confirm?
IE will not ignore your other stylesheet, the idea is to overide
instructions for IE6's eyes only. Thus if you make sure that the link to
the IE6 sheet is below the one for all browsers, any instructions that
are different in the lower one than the higher one will take precedence.
But this is not always just a simple matter, it depends on the IE
instruction being genuinely an override.

Here is a very simple example and if you stick to such things you will
be ok:

forAll.css has ul.pics {margin-left: 14px;}

forIE6Only.css has ul.pics {margin-left: 8px;}

IE6 will get 8px for this margin.

And, of course, the other browsers do not see the 8px instruction.

--
dorayme
Oct 3 '08 #4

P: n/a
dorayme wrote:
In article <48***********************@news.newsdemon.com>,
Martin <sh********@gmail.comwrote:
>C A Upsdell wrote:
Google for "Conditional Comments"

OK, so if I use those IE will ignore other statements on the page? It's
not entirely clear from the few pages I browsed just now that in

<!?[if IE 6]>
<link href=?../ie6.css? rel=?stylesheet? ???. />
<![endif]?>
<link href=?../ff.css? rel=?stylesheet? ???. />

IE will ignore the ff.css. I suppose so, but can anyone confirm?

IE will not ignore your other stylesheet, the idea is to overide
instructions for IE6's eyes only. Thus if you make sure that the link to
the IE6 sheet is below the one for all browsers, any instructions that
are different in the lower one than the higher one will take precedence.
But this is not always just a simple matter, it depends on the IE
instruction being genuinely an override.

Here is a very simple example and if you stick to such things you will
be ok:

forAll.css has ul.pics {margin-left: 14px;}

forIE6Only.css has ul.pics {margin-left: 8px;}

IE6 will get 8px for this margin.

And, of course, the other browsers do not see the 8px instruction.
Ah, "of course" ... too early in the morning for me.
Thanks.

Martin S

--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access
Oct 3 '08 #5

P: n/a

Martin wrote:
We are trying to create a stylesheet that works both for FF and MSIE. I've
been googling a bit yesterday and found some hints (like using #margin-left
or _margin-left for MSIE) but it seems these are outdated, as they also
affect FF.
Rather than give a pat answer about how to make separate stylesheets, I
think it better to ask why you think you need to do this in the first
place. Granted, there are IE bugs that do come into play, especially in
IE6, but there is always more than one way to work around such problems.
This must be a FAQ (anyone with the address to it?) but how do I write
margin-top: -40px;
margin-left: 170px;
so FF actually uses both directions while MSIE ignores the margin-left
instruction?
Without knowing the context, my first reaction is you may be trying to
fix the wrong problem. Post a URL and you may find there is a better way.

--
Berg
Oct 3 '08 #6

P: n/a
Bergamot wrote:
Without knowing the context, my first reaction is you may be trying to
fix the wrong problem. Post a URL and you may find there is a better way.
OK,
www.stockholmschack.nu

The menu is all over the place...

--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access
Oct 3 '08 #7

P: n/a

Martin wrote:
Bergamot wrote:
>Without knowing the context, my first reaction is you may be trying to
fix the wrong problem. Post a URL and you may find there is a better way.
OK,
www.stockholmschack.nu

The menu is all over the place...
I must have caught the page while you were doing some kind of update.
Styles were applied, now they're not - at all. The default.css link
syntax isn't correct. Add rel="stylesheet" and type="text/css" to it.

As for your problem, assuming you mean the horizontal #menu across the
top of the page, you have absolutely positioned it, but not set any
position values (top, bottom, left or right), so you've left it to the
browser's imagination to decide where its default position should be.
It's no wonder results aren't consistent. Consequently, your offsetting
margin values aren't consistent, either.

If you want it at the bottom of #header, use bottom instead of a top
offset. That way it will keep a fixed baseline as it adapts to various
text sizes, and not expand down into the content area when the text size
is increased.

BTW, you should also fix some of those 284 HTML validation errors you've
got there, as well as the 2 CSS errors.

And do *something* about the text in the left column jumping all over
the place on :hover. It's pretty bad.

--
Berg
Oct 3 '08 #8

P: n/a
Bergamot wrote:
>
Martin wrote:
>Bergamot wrote:
>>Without knowing the context, my first reaction is you may be trying to
fix the wrong problem. Post a URL and you may find there is a better
way.
OK,
www.stockholmschack.nu

The menu is all over the place...

I must have caught the page while you were doing some kind of update.
Styles were applied, now they're not - at all. The default.css link
syntax isn't correct. Add rel="stylesheet" and type="text/css" to it.
It's not me doing the coding I'm just a friend trying to help him out. I
believe he's an asp-coder, that just nicked a menu javascript thing that is
MS specific regarding the alignment of the menu.

It works with MSIE not with FF. The Conditional Comments method works nicely
on my laptop, but not when he uploads the stuff to his server - it is all
very frustrating. Don't really know what's happening here.

Thanks for you time though.... appreciated!

--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access
Oct 3 '08 #9

P: n/a

Martin wrote:
Bergamot wrote:
>Martin wrote:
>>www.stockholmschack.nu

The menu is all over the place...

The default.css link
syntax isn't correct. Add rel="stylesheet" and type="text/css" to it.

It's not me doing the coding I'm just a friend trying to help him out. I
believe he's an asp-coder, that just nicked a menu javascript thing that is
MS specific regarding the alignment of the menu.
I already said what was wrong with the menu positioning. It's *not* an
IE specific problem. The #menu rules are assuming a certain default
position, which is a false assumption, and hoping that certain margin
offsets will fix it. Wrong again. Dump the margins altogether.
#menu {
position: absolute;
left: 170px;
bottom: 0;
}

Adjust the width value as needed.

And the <linkto the default stylesheet still needs correcting, because
it isn't loading at all now.

--
Berg
Oct 3 '08 #10

P: n/a
Bergamot wrote:
I already said what was wrong with the menu positioning. It's not an
IE specific problem.
OK, OK,
I *assumed* it was IE specific as it displayed correctly in IE and
incorrectly in FF. Apparently he has badly foobared the site at the moment.

Martin S

--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access
Oct 4 '08 #11

This discussion thread is closed

Replies have been disabled for this discussion.