The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.



Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Howto include Opera css?
PostPosted: Fri Jan 04, 2008 1:50 pm 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Wed May 17, 2006 10:52 pm
Posts: 279
I try to include a special css file, if the user uses Opera browsers.

Anyone knows what its called, the below exampel is not working...
Code:
<!--[if Opera]>
<link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/opera.css" rel="stylesheet" type="text/css" />
<![endif]-->


Thanx


Top
 Profile  
 
PostPosted: Fri Jan 04, 2008 5:15 pm 
Joomla! Guru
Joomla! Guru

Joined: Wed Jul 12, 2006 8:11 pm
Posts: 536
Location: Ames, IA
Opera is the most standards compliant browser available, so your default/main css should strive to be rendered correctly in Opera. 

If it displays correctly in Opera, it's likely that it will  also look good in Firefox, too (though there could be some small issues).

... then use special css files for IE6 and/or IE7 if/when needed, since they are the least standards compliant (especially IE6).

... Then vow to never use IE unless required (Windows Update, etc.) and spread the word about standards compliant browsers so future web designers can actually count on standards to be followed! :)

_________________
Tanzania Partners - A nonprofit group working with Tanzanians for progress.
Shop online and automatically make a donation! - http://www.tzpartners.org
St. Andrew's Lutheran Church, Ames, Iowa, ELCA - http://www.standrewsames.org


Top
 Profile  
 
PostPosted: Fri Jan 04, 2008 6:07 pm 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Wed May 17, 2006 10:52 pm
Posts: 279
I have optimized for firefox but many parts look stil odd in opera, so please someone tell me how to end this nightmare and let me create a opera.css...

thanx!


Top
 Profile  
 
PostPosted: Fri Jan 04, 2008 7:02 pm 
Joomla! Guru
Joomla! Guru

Joined: Wed Jul 12, 2006 8:11 pm
Posts: 536
Location: Ames, IA
Seriously, the best solution is to make the css "correct"... then it will work in Opera.

THEN check Firefox (should be ok) and IE6/7 (problems likely).

_________________
Tanzania Partners - A nonprofit group working with Tanzanians for progress.
Shop online and automatically make a donation! - http://www.tzpartners.org
St. Andrew's Lutheran Church, Ames, Iowa, ELCA - http://www.standrewsames.org


Top
 Profile  
 
PostPosted: Fri Jan 04, 2008 9:03 pm 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Wed May 17, 2006 10:52 pm
Posts: 279
Its not possible ... and it really is time consuming so i just want to make another css for opera....


Top
 Profile  
 
PostPosted: Sat Jan 05, 2008 2:07 pm 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Wed May 17, 2006 10:52 pm
Posts: 279
bump, can someoen point please out which code i need to make a css include for Opera browser?

Thanx,
Laura


Top
 Profile  
 
PostPosted: Sat Jan 05, 2008 2:26 pm 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Wed May 17, 2006 10:52 pm
Posts: 279
saetveit,
the problem is this code which is diffrent in ANY browser ... i made this

template 1.5
NO TABLES
Code:
 <div class="nav_top">
      <div class="nav_m" align="left">
         <div class="nav_r"></div>
         <div class="nav_l"></div>
         <div id="search"><jdoc:include type="modules" name="search" /></div>
         <div id="topmenu"><jdoc:include type="modules" name="top" /></div>
      </div>
   </div>


the relatvie css
Code:
/* TOP MENU - Navigation */
#nav_top {
   width: 980px;
}
.nav_l {
   width: 12px;
   height: 30px;
   background:url(../images/bg_corner_left_top.png) no-repeat;
    padding: 0;

   float: left;
}
.nav_m {
    background: url(../images/bg_top_nav.png) repeat-x;
     width: 980px;
     height: 30px;
    padding-top: 0px;
   vertical-align: top;
}
.nav_r {
   width: 12px;
   height: 30px;
   background:url(../images/bg_corner_right_top.png) no-repeat;
    padding: 0;
   
   float: right;
}
#search{float: right;}
#topmenu table{   width: auto;}
#topmenu{}
#topmenu a{
     font-family:"Trebuchet MS",sans-serif;
     font-size: 13px;
     font-weight: bold;
     line-height: 26px;
     padding-left: 18px;
   padding-right: 18px;
     color: #fff;
     text-decoration: underline;
   padding-top:4px;
   
}
#topmenu a#active_menu {
   text-decoration: none;
   margin: 0px;
   color: #ff6700;
   background-color: #fff;
   background:url(../images/bg_nav_active.png);
   padding-left: 18px;
   padding-right: 18px;
   padding-top:5px;
   padding-bottom:7px;

}



So im really realyl happy that i made it working in ie and firefox ..and opera.. buit still the oddity IS the search button wiredness with aligning the nice tiny button with the search input window (mod_search_word). Thsi is soooo wired, so im happy im here but now i need to adjust opera search box, so i realyl dont care if opera is compliant or not i need to include the css extra for oera, because ther eis no solution, as long no1 hacks the core search :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 



Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group