Solved

How do I make left navigation bar height differences compatible in IE vs FF, also how to style jump menu (not finished on page)

Posted on 2008-10-19
4
233 Views
Last Modified: 2012-05-05
How do I make the length of the left navigation area even with the photo and right side news area compatible for IE7 and FF2?   I would really rather not have to create a different CSS for each browser!
Test site is at http://www.wsdgmedia.com/ccpetest/template.html, css is attached.

I know I mixed tables and CSS, but was requested to do so.  

Also, on this same file, I want to style the jump menu to coordinate with the rest of the site. So the drop down button, the borders of the box, etc.


ccpe-css.txt
0
Comment
Question by:cjceer
  • 2
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
eszaq earned 250 total points
ID: 22759561
If you want your CSS clean, you HAVE to create separate CSS file for IE. Do not create complete CSS file, just a small one with a few fixes. Actully, you have to create two new css files - one more for IE6 with additional fixes (IE6 is still used a lot and is much buggier then IE7).  Use syntax readable by IE browsers only:

<link href="styles/ccpe.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<link href="styles/ie.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!--[if IE 7]>
<link href="styles/ie6.css" rel="stylesheet" type="text/css" />
<![endif]-->

These stylesheets will be ignored by Firefox as it will see the code as HTML comments. Make sure to call CSS files in this order. So declarations in CSS targeting IE override declarations in main stylesheet.
0
 

Author Comment

by:cjceer
ID: 22760740
Can you recommend a good resource to make the CSS files compatible per browser as you have outlined?  

0
 
LVL 8

Assisted Solution

by:eszaq
eszaq earned 250 total points
ID: 22763030
You can start here:
http://www.webcredible.co.uk/user-friendly-resources/css/internet-explorer.shtml
http://www.positioniseverything.net/explorer.html
Google search for 'css IE bugs' will bring you a boatload of links.

Also, you can search for 'css hacks', but using hacks results in messy CSS that you can get lost in. So, use of additional CSS files for IE is better - clean and easy to keep track of.
0
 

Author Closing Comment

by:cjceer
ID: 31507682
I was hoping for an easier approach, but sometimes the best way isn't the easiest way.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now