473,398 Members | 2,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

CSS in IE6 help much apreciated.

Hi all

I've just started with CSS as part of a Masters course. I have a couple of pages up and running but am encountering an issue in IE6. The pages work fine in IE 7 and firefox but for some reason in IE6 my images get dumped to the bottom. They are supposed to sit in the right hand div and slightly overlap the left had edge.

I'm sure there is something simple amiss but I'm going around in circles and would really apreciate some help before I completely mess up the code. A friend posted the question for me on metafilter, I got some replies but the suggestions didnt seem to work out..

Im not sure what the etiquet is here (code or url) so here are the urls:

Thanks if you can help

http://www-users.york.ac.uk/~ga114/
http://www-users.york.ac.uk/~ga114/cricket.html
Oct 27 '06 #1
9 1500
drhowarddrfine
7,435 Expert 4TB
I have been preaching for years, and getting tarred and feathered, about how bad IE6 is as a browser but it is just now that people like you are seeing what I am talking about. Evidence is how the 'improved' IE7 is now displaying more like every other browser while IE6 falls apart.

But I digress.

Check the widths of your containing element compared to the total width of the contained elements. IE tends to throw in a few extra pixels to help screw you up. Even if the total width is supposed to be, say, 800px and everything adds up to 800px, IE will add a few more.
Oct 27 '06 #2
You are right now I am seeing the evil that is IE 6 I'll check out the widths, it is odd how in various IE's 50% + 50% rarly seems to add up to 100%. Loooks great in 7 and Firefox but most university computers seem to have IE6.
Oct 27 '06 #3
drhowarddrfine
7,435 Expert 4TB
Unless your school opts out, IE7 will be pushed with Windows Update in the next couple of weeks.
Oct 27 '06 #4
SamKL
27
Are you thinking it's safe to say IE6 is finally going to phase out?

(I really hope so...)
Oct 27 '06 #5
drhowarddrfine
7,435 Expert 4TB
Good question. How many average Joes update their computers when auto update tells them to? How many have auto update on? How many corporations didn't heed Microsofts warnings that their sites might break under IE7 and didn't fix them? So now they won't let their users upgrade. Some people still use IE5.

As sites start making themselves more standards compliant and people notice the sites don't work in IE6, enough will be told to upgrade to IE7, or switch to better browsers like Firefox or Opera, that IE6 will fade. The whole IE thing is such a mess.
Oct 27 '06 #6
Well I tried playing around with widths.. it will work in ie6 as long as the image does not overlap the div next to it which kind of defeats the object. So do I stick with what I think looks good (and works in 7, ff, opera, etc...) or have somrthing that does not look quite as good but works in all browsers, therein lies the question I suppose.
Oct 27 '06 #7
the solution is to have 2 stylesheets, use javascript to detect the browser then document.write the link to external sheet based on user_agent.....
I typically have a mozStyle.css and an ieStyle.css.......

It's the only solution that will keep you sane.
Oct 27 '06 #8
skase98
25
Could you give an example of the code that gets you there? Is it javascript? I've seen a few multiple stylesheets but the ie.css versions I've viewed all seem to have only two divs, usually something to do with container and body. I'm just baffled by how that actually works.

I'm battling FF vs. IE (sort of like Godzilla vs. Hedora) and think this may be my simplest solution.

Thanks!

Kathy
Oct 31 '06 #9
Expand|Select|Wrap|Line Numbers
  1. <SCRIPT LANGUAGE = "JavaScript">
  2. <!-- 
  3. var browser     = '';
  4. var version     = '';
  5. var entrance    = '';
  6. var cond        = '';
  7. // BROWSER?
  8. if (browser == ''){
  9. if (navigator.appName.indexOf('Microsoft') != -1)
  10. browser = 'IE'
  11. else if (navigator.appName.indexOf('Netscape') != -1)
  12. browser = 'Netscape'
  13. else browser = 'IE';
  14. }
  15. if (version == ''){
  16. version= navigator.appVersion;
  17. paren = version.indexOf('(');
  18. whole_version = navigator.appVersion.substring(0,paren-1);
  19. version         = parseInt(whole_version);
  20. }
  21. if (browser == 'IE' && version >= 4) document.write('<'+'link rel="stylesheet" href="iestyle.css" />');
  22. if (browser == 'Netscape' && version >= 2.02) document.write('<'+'link rel="stylesheet" href="mozillastyle.css" />');
  23. // -->
  24. </SCRIPT>
Nov 1 '06 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: juglesh | last post by:
hi, I'm just getting started here in php, but i've been able to get some basic variable stuff working, so I'm just looking for advice on the basic set up of some thumbnail->picture pages. the...
12
by: windandwaves | last post by:
Hi Folks I have just completed a project for an accommodation finder in New Zealand - much with your help - thank you again. I would appreciate any constructive or deconstructive comments. ...
2
by: Tim Richardson | last post by:
I've been doing a lot of reading on this and my head is starting to hurt! It seems to be quite a feat to work out how much memory is actually being used by our server. I'm running W2K advanced...
8
by: Steve1 via DotNetMonster.com | last post by:
Hi all, I've just finished learning C#. I would like to move onto learning ASP.NET but I would like to produce an ASP.NET site using C# so to cement my C# skills. If I were to produce a basic...
113
by: dan | last post by:
For writing a Windows desktop application, how much harder is it to use the Windows C API than C#/.NET, assuming the coding is done in an editor? What specific aspects were more difficult? I'm...
2
by: tomtom99 | last post by:
Hi guys! My first post here of many here so go easy one me :) Skip this paragraph for my question but just to give you some background info as to enlighten you in my situation I'm 19 years old...
4
by: bipi | last post by:
hi everyone, Can show to me how much memory for C program. (It depend on OS, RAM... or some thing like that). Please help me to understand. Thanks,
0
by: Pretty nice site, wants to see much more on it!,Pr | last post by:
Pretty nice site, wants to see much more on it!,Pretty nice site, wants to see much more on it!,Pretty nice site, wants to see much more on it!
7
by: Sanny | last post by:
I have an app in Java. It works fine. Some people say Java works as fast as C. Is that true? C can use assembly language programs. How much faster are they inplace of calling general routines. ...
11
by: Hamayun Khan | last post by:
HI All My client requirements are such that I m going to generate query runtime in asp.net. At some time the query reaches to very much length as below SELECT...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.