[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 05-24-2004, 02:40 PM   #1 (permalink)
New Member
 
Join Date: May 2004
Location: Wisconsin, USA
Posts: 3
3.00 NP$ (Donate)

todd098 is an unknown quantity at this point


mozilla and IE CSS :(

I am making a site using CSS. When I get the spacing right for mozilla it is screwed up for IE. Is there some way to fix this so it looks the same for both? Can I put something in my code which has two parts one with spacing for mozilla and one with spacing for IE? Thanks!
__________________
http://www.ppbt.net
todd098 is offline  
Old 05-26-2004, 01:59 PM   #2 (permalink)
NamePros Member
 
Join Date: May 2004
Location: Devon, UK
Posts: 76
145.00 NP$ (Donate)

Spirited is an unknown quantity at this point


I think you'll have to explain a little more what you are trying to do, and maybe give us a link so we can see how you are doing it. There are quite a few workarounds about for coping with IE's interpretation of W3C's CSS.

Other than that I'm afraid its just a case of fiddling till it looks good in both browsers (even if one isn't just how you intended)
Spirited is offline  
Old 06-08-2004, 08:01 PM   #3 (permalink)
NamePros Member
 
Cjpixel's Avatar
 
Join Date: Mar 2004
Location: Cebu City
Posts: 36
52.00 NP$ (Donate)

Cjpixel is an unknown quantity at this point


HI!

I am sorry that I can not present you with an answer because I am a beginer with CSS. Instead I would pose another question.
Are there CSS codes that won't work in Mozilla and I.E. ? I know that HTML has few that won't function on Netscape Navigator.
__________________
How would my life be without you?
Where would I be without you.....
Cjpixel is offline  
Old 06-08-2004, 08:15 PM   #4 (permalink)
James
Guest
 
Posts: n/a
Cash Balance: $0 (Check)
0.00 NP$ (Donate)



You can hide CSS from Internet Explorer (Windows), but still show it to the newer builds of Mozilla (and all members of the Mozilla project), Safari, and Opera, by using child selectors.
Code:
/* Internet Explorer will see this.
Note: Older CSS enabled browsers, such as Netscape 4.7,
will see this unless it is imported as shown below. */

p { width: 100px; }

/* The others will see this, ignoring the style above */

body>p { width: 120px; }
Hiding something from Mozilla is much more difficult as Mozilla is quite caught up with Web standards. If something you are doing isn’t working in Mozilla, odds are you aren’t following standards in the first place though, so that sort of works out in the end.

You can hide code from browsers prior to 5.x by importing them via include.
Code:
<style type="text/css" media="screen">
  <!--
    @import "foo.css";
  -->
</style>
You can also work around Internet Explorer 5–5.5 by using Tantek Çelik’s Box Model Hack (originally intended to help make CSS layouts consistent from browser to browser when Internet Explorer was messing up the Box Model.

Last edited by James; 06-08-2004 at 08:20 PM.
 
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 05:01 PM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85