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
IE8 f**ked up my photo gallery
Old 07-05-2009, 05:18 PM IE8 f**ked up my photo gallery
Experienced Talker

Posts: 46
Name: Jethro Williams
Trades: 0
My website displayed exactly as I wanted it to in all versions of all browsers that I tested it with. Until I downloaded IE8. And IE8 doesn't display the photo gallery correctly.

Taking http://www.jrosworld.com/gallery/can...ery_index.html as an example page, what should be displayed, is a photo gallery where photos are displayed in rows of 3. In IE8, the photo gallery only displays in rows of 2.

So I thought that the easiest thing to do, would be to reduce the size of the photos so that they are small enough that IE8 displays them in rows of 3 as well. But the problem in doing that, is that firefox then shifts the photos around and it doesn't display correctly there anymore. And I'm pulling my hair out, because I cannot figure out what it is, that is making Firefox act like this. And also, why the f**k couldn't IE8 just act like IE7? It worked there.

This is the relevant part of the style sheet as it currently is.

Code:
div.photo {
    margin-left:4%;
    margin-right:4%;
    border-style:none;
    display:inline;
}

div.photo img {
    margin-top:25px;
    max-width:25.3%;
    min-width:25.3%;
    border-width:1px;
    border-style:solid;
    border-color:#0044AA;
    vertical-align:middle;
}
Altering this code to
Code:
div.photo {
    margin-left:4%;
    margin-right:4%;
    border-style:none;
    display:inline;
}

div.photo img {
    margin-top:25px;
    max-width:24.7%;
    min-width:24.7%;
    border-width:1px;
    border-style:solid;
    border-color:#0044AA;
    vertical-align:middle;
}
and the gallery displays correctly in IE8, but not in Firefox.

Altering the code to
Code:
div.photo {
    margin-left:4%;
    margin-right:4%;
    border-style:none;
    display:inline;
}

div.photo img {
    margin-top:25px;
    max-width:24.8%;
    min-width:24.8%;
    border-width:1px;
    border-style:solid;
    border-color:#0044AA;
    vertical-align:middle;
}
and the gallery displays correctly in Firefox, but not IE8.

And I've tested altering the min/max img width to something like 10 decimal places. There is no point that it works in both.

Similarly, I can alter this code to
Code:
div.photo {
    margin-left:3.7%;
    margin-right:3.7%;
    border-style:none;
    display:inline;
}

div.photo img {
    margin-top:25px;
    max-width:25.3%;
    min-width:25.3%;
    border-width:1px;
    border-style:solid;
    border-color:#0044AA;
    vertical-align:middle;
}
then it displays perfectly in IE8, but not in Firefox.

But if I alter it to
Code:
div.photo {
    margin-left:3.8%;
    margin-right:3.8%;
    border-style:none;
    display:inline;
}

div.photo img {
    margin-top:25px;
    max-width:25.3%;
    min-width:25.3%;
    border-width:1px;
    border-style:solid;
    border-color:#0044AA;
    vertical-align:middle;
}
then it displays perfectly in Firefox, but not in IE8.

If anyone can help me figure out, either what I can add to this code to make it work in both IE8 and Firefox, or what the problem is with either IE8 or Firefox, so I can fix it so that it works in both browsers, I'll be so greatful. Because this is really making me pull my hair out. I am totally stumped.
__________________

Please login or register to view this content. Registration is FREE
jrosworld.com is offline
Reply With Quote
View Public Profile Visit jrosworld.com's homepage!
 
 
Register now for full access!
Old 07-05-2009, 05:25 PM Re: IE8 f**ked up my photo gallery
AD7863's Avatar
Major Geek

Posts: 435
Name: Artful Dodger
Location: England, UK
Trades: 0
CALM DOWN and read this thread, I think it has the solution to your problem.
__________________

Please login or register to view this content. Registration is FREE
AD7863 is offline
Reply With Quote
View Public Profile Visit AD7863's homepage!
 
Old 07-06-2009, 11:00 AM Re: IE8 f**ked up my photo gallery
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Quote:
why the f**k couldn't IE8 just act like IE7?
Watch the language please.

IE8 was FINALLY made to be more standards-compliant than any of it's predecessors, although bugs are being discovered, which is no surprise whatsoever.

Unfortunately, I don't have IE8 installed anywhere, so I cannot be certain what is going on, IE8 should render much more closely to Firefox, but the linked thread, which references the need to use conditional comments and a separate "fixes only" css file is what you will likely need anyway.
__________________
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 07-06-2009, 06:02 PM Re: IE8 f**ked up my photo gallery
Experienced Talker

Posts: 46
Name: Jethro Williams
Trades: 0
This is how my document header currently looks:

Code:
<title>Photos of Gabriola Island BC, Canada</title>
    <meta name="description" content="The main photos page for the Gabriola Island leg of my round the world travelling and backpacking" />
    <meta name="keywords" content="Gabriola Island BC,Canada,photos,photographs,pictures,petroglyphs,Drumbeg provincial park" />
    <link rel="stylesheet" type="text/css" href="../../masterss.css" />
    <script type="text/javascript" src="../../masterjs.js"></script>
I don't fully understand all the code used here, so just to confirm how I should be entering it, if I was to create a stylesheet called "ie_ss.css" in my root folder, which would be my IE stylesheet, then would my document header therefore look like this? Or do I need to incorporate the <link> tag into the code somewhere?

Code:
<head>
    <title>Photos of Gabriola Island BC, Canada</title>
    <meta name="description" content="The main photos page for the Gabriola Island leg of my round the world travelling and backpacking" />
    <meta name="keywords" content="Gabriola Island BC,Canada,photos,photographs,pictures,petroglyphs,Drumbeg provincial park" />
    <link rel="stylesheet" type="text/css" href="../../masterss.css" />
    <!--[if IE]> <style type="text/css">@import "../../ie_ss.css";</style> <![endif]-->
    <script type="text/javascript" src="../../masterjs.js"></script>
</head>
Thanks for the help. That article was good for explaining what conditional comments were, but it didn't make it too clear how to implement them.
__________________

Please login or register to view this content. Registration is FREE
jrosworld.com is offline
Reply With Quote
View Public Profile Visit jrosworld.com's homepage!
 
Old 07-06-2009, 09:48 PM Re: IE8 f**ked up my photo gallery
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
I typically do it this way:

Quote:
<!--[if lt IE 7]>
<link href="iefixes.css" rel="stylesheet" type="text/css" /> <![endif]-->
<!--[if gt IE 6]>
<link href="ie7fixes.css" rel="stylesheet" type="text/css" /> <![endif]-->
Not sure why you want to use the @import, you actually run the risk of the dreaded 'flash of unstyled content" or FOUC, and the import takes longer.
__________________
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 07-07-2009, 12:29 AM Re: IE8 f**ked up my photo gallery
Experienced Talker

Posts: 46
Name: Jethro Williams
Trades: 0
Awesome, I got it figured out thanks!!!

Quote:
Originally Posted by LadynRed View Post
Not sure why you want to use the @import, you actually run the risk of the dreaded 'flash of unstyled content" or FOUC, and the import takes longer.
I was just copying the code from the thread linked to earlier. I've never used, or even heard of, conditional comments before. I wasn't sure if I'd be messing it up by taking out the @import.

In the end I just used one comment:
Code:
<!--[if gte IE 8]><link href="ie_override_ss.css" rel="stylesheet" type="text/css" /><![endif]-->
I've managed to write my site so, as far as I'm aware, it's always worked with IE (with a lot of effort), prior to IE8. I didn't want to make life harder for myself than it had to be by adding in 2 new stylesheets.

God I hate Internet Explorer!
__________________

Please login or register to view this content. Registration is FREE
jrosworld.com is offline
Reply With Quote
View Public Profile Visit jrosworld.com's homepage!
 
Old 07-07-2009, 01:24 PM Re: IE8 f**ked up my photo gallery
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Well, the ONLY thing that needs to be in those ie only stylesheets is JUST the rules to make IE behave, you don't need to duplicate the rest of the main stylesheet.
__________________
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 IE8 f**ked up my photo gallery
 

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.19867 seconds with 12 queries