472,962 Members | 2,840 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,962 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 1456
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...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

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.