473,383 Members | 1,795 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Surely a FAQ - FF and MSIE

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
10 1467
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
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
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
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

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
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

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
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

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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Richard Shea | last post by:
Hi - I'm writing a script which fetches a page from a web server and takes note of any set-cookies which are served in the headers so that when I next request a page I can send those cookies back...
6
by: Ralph A. Gable | last post by:
I am opening MSIE6 with this code: ie=Dispatch('InternetExplorer.Application.1') ie.Navigate(url) while ie.Busy: time.sleep(0.1) ied=ie.Document while ied.ReadyState != 'complete':...
3
by: Stan Brown | last post by:
Standard advice -- even given here recently -- for hiding CSS from MSIE 4.x is to enclose the styles in @media { ... }. The same advice is given at . Unfortunately, it doesn't work with MSIE...
4
by: Alex Bell | last post by:
I am developing at http://www.members.iinet.net.au/~abell1/test/index.htm with city.css at http://www.members.iinet.net.au/~abell1/test/city.css. Both validate. In index.htm there is a block of...
0
by: Alex Bell | last post by:
Thanks to the people who helped me with centering a block of text in MSIE 5.5 in the site I am developing at http://www.members.iinet.net.au/~abell1/test/index.htm with city.css at...
5
by: Alex Bell | last post by:
I have a fluid header/two column layout at http://www.members.iinet.net.au/~abell1/test/demo10.htm which works with windows MSIE 5.5 and 6, Mozilla, Netscape, and Opera; and Safari but which...
4
by: - Dazed | last post by:
If a user is using a combination of Win98 & any version of MSIE, I want to display a message. The best that I can do is the following: <? if ((strstr (getenv('HTTP_USER_AGENT'), 'MSIE')) &&...
7
by: Dobedani | last post by:
Dear All, I am developing / maintaining a web application which generates GIF images on the fly. When I send the image, I make sure a header is sent first with MIME-type image/gif. My HTML-code...
1
by: ticmanis | last post by:
Hello, I'm having trouble getting MSIE 6.0 (running on XP SP2) to accept a cookie which works fine in both Firefox and wget. The web server is Boa 0.94.13 (a small embedded server) using PHP...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.