Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
CSS in IE and FireFox
Old 03-04-2007, 04:36 AM CSS in IE and FireFox
Extreme Talker

Posts: 189
Trades: 0
Here is the css for IE

HTML Code:
<style type="text/css">
body {background: #b28945;}
.img1{position:absolute;top:0;left:0;width:984;height:1400;}

.div1{background: black; position:absolute;top:444;left:27;width:270;height:842; overflow:auto; }
.div2{background: black; position:absolute;top:442;left:365;width:578;height:842; overflow:auto; }

</style>
And here is the css for Fire Fox


HTML Code:
<style type="text/css">
body {background: ##BA9451;}
.img1{position:absolute;top:0;left:0;width:984;height:1400;}

.div1{background: black; position:absolute;top:444;left:27;width:270;height:842; overflow:auto; }
.div2{background: black; position:absolute;top:442;left:365;width:578;height:842; overflow:auto; }

</style>
I would like to know how to have my firefox css and ie css code wirking in those browsers.

(one css for ie7 and another for firefox) maybe javascript or something.
simster is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-04-2007, 05:21 AM Re: CSS in IE and FireFox
Insensus's Avatar
Ultra Talker

Posts: 487
Name: Mark Stegeman
Location: Netherlands, Europe
Trades: 0
You'll have to use conditional comments for that I guess.
I'm not aware of how they work though.
It's explained in this topic:
http://www.webmaster-talk.com/javasc...tylesheet.html

Regards,
Insensus
__________________
<?php ($helpfull>0)?$talkupation++ : '';?>
Insensus is offline
Reply With Quote
View Public Profile
 
Old 03-04-2007, 05:25 AM Re: CSS in IE and FireFox
OmuCuSucu's Avatar
Vi Veri Veniversum Vivus

Posts: 1,168
Name: Dragos-Valentin
Location: Cluj-Napoca, RO
Trades: 0
you only have background color different ... i don't see any point in using code twice. just use the conditional comments as descibed in the post Insensius gave you, but i suggest using them only for the differences
__________________
.
» Please remember to add to my Talkupation if you enjoyed my post. Thank you :)
.
OmuCuSucu is offline
Reply With Quote
View Public Profile
 
Old 03-04-2007, 06:50 AM Re: CSS in IE and FireFox
Extreme Talker

Posts: 189
Trades: 0
can some one give me the code because i cant use php code on my free site

Last edited by simster; 03-04-2007 at 06:58 AM..
simster is offline
Reply With Quote
View Public Profile
 
Old 03-04-2007, 07:45 AM Re: CSS in IE and FireFox
Insensus's Avatar
Ultra Talker

Posts: 487
Name: Mark Stegeman
Location: Netherlands, Europe
Trades: 0
It isn't PHP:

Code:
<!--[if lt IE 7]>
call your style sheet here
<![endif]-->
__________________
<?php ($helpfull>0)?$talkupation++ : '';?>
Insensus is offline
Reply With Quote
View Public Profile
 
Old 03-04-2007, 03:48 PM Re: CSS in IE and FireFox
Extreme Talker

Posts: 189
Trades: 0
in the css stylesheet (end with .css) do i need style tags or whatever
simster is offline
Reply With Quote
View Public Profile
 
Old 03-04-2007, 04:08 PM Re: CSS in IE and FireFox
Insensus's Avatar
Ultra Talker

Posts: 487
Name: Mark Stegeman
Location: Netherlands, Europe
Trades: 0
I don't see what you mean, I'm afraid.
__________________
<?php ($helpfull>0)?$talkupation++ : '';?>
Insensus is offline
Reply With Quote
View Public Profile
 
Old 03-04-2007, 04:20 PM Re: CSS in IE and FireFox
Angelosanto's Avatar
Webmaster Talker

Posts: 548
Name: Danny Angelosanto
Trades: 0
NO! Don't use style tags in your stylesheet. It's not necessary to use them unless the stylesheet is contained within the HTML page.
__________________
"The only reason some people get lost in thought is because it's unfamiliar territory."
_____________________________________
Angelosanto is offline
Reply With Quote
View Public Profile Visit Angelosanto's homepage!
 
Old 03-04-2007, 09:44 PM Re: CSS in IE and FireFox
Extreme Talker

Posts: 189
Trades: 0
and what code do i use to embed to .css stylesheet
simster is offline
Reply With Quote
View Public Profile
 
Old 03-04-2007, 10:52 PM Re: CSS in IE and FireFox
taketherisk's Avatar
Skilled Talker

Posts: 89
Name: Brett
Location: New Zealand
Trades: 0
hi,

Heres the code:
Code:
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
<![endif]-->
But i don't see why you are making another file for IE. You could just have:

Code:
<!--[if lt IE 7]>
<style type="text/css">
<!--
body {background: #b28945;}
-->
</style>
<![endif]-->
Hope this helps

-Brett
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
taketherisk is offline
Reply With Quote
View Public Profile
 
Old 03-05-2007, 12:14 PM Re: CSS in IE and FireFox
AliKat's Avatar
Extreme Talker

Latest Blog Post:
Save the Children
Posts: 176
Location: MS
Trades: 0
I could be wrong but I'm pretty sure you need to include units in your heights and widths to be standards compliant.
AliKat is offline
Reply With Quote
View Public Profile Visit AliKat's homepage!
 
Old 03-05-2007, 02:52 PM Re: CSS in IE and FireFox
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Quote:
I could be wrong but I'm pretty sure you need to include units in your heights and widths to be standards compliant.
You are correct, but it's not just for standards compliance, it's good practice.

Conditional comments should be used to target the IE browsers. I have 3 css files on my sites: 1 for FF and all the 'good' browsers; 1 for IE 6 and below; 1 for IE 7. The ONLY thing contained in the IE 6 and 7 css files are the rules needed to make IE behave, nothing else.

Yes, you have multiple files, but it is minimal and the secondary files are not complete duplicates of the main css file.

Simster, why are you using all that absolute positioning ?? Generally not a good idea at all.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 03-05-2007, 11:17 PM Re: CSS in IE and FireFox
Extreme Talker

Posts: 189
Trades: 0
im making a div site
simster is offline
Reply With Quote
View Public Profile
 
Old 03-06-2007, 02:22 PM Re: CSS in IE and FireFox
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Quote:
im making a div site
Huh ? We know that, and my comment is only relevant to a table-less site.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to CSS in IE and FireFox
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.66855 seconds with 12 queries