PDA

View Full Version : HATE internet explorer coding!!!! Again~



Jojee
04-15-2008, 12:48 AM
I can't get tables to show right in internet explorer, but they show perfectly in Firefox. I checked and rechecked a million times to make sure I closed all my tags and that they were correct. For example, let's take this:

<table>
<tr>
<td>

Blah blah
<table>
<tr>
<td>
blah
</td>
</tr>
</table>

</td>
</tr>
</table>

Now, IE makes it so that when I close the table tags for the table INSIDE the content, it registers it as closing the original table tags, and that completely screws over the layout. T_T

Does anyone know how to fix this?

(My tables are a lot more complicated than that, but I checked and closed everything right!)



<b>EDIT</b>: Okay. I rewrote a lot of the script and tested, and it's due to this in my header:

table {
width:expression(document.body.clientWidth > 1100? "1100px": "auto" );
}

When I removed it, the tables inside the tables close fine, but it brings out other problems with the table after I exceed the 1100px limit and doesn't actually set a max width. There's no way I can get multiple tables and max-width for tables to be compatible?

Screw you, IE people. I hate you all.

rubah
04-15-2008, 01:15 AM
I would try and spend a few hours helping you if I had immediate access to IE? :D

I'd say just let the IE users suffer a huge table and run with it.

Jojee
04-15-2008, 01:19 AM
It looks soooo bad though. xD It's not just a huge table, it looks cut off and wrong and disjointed.

Edit: And that's even with the width:expression removed, because I have max-width: 1100px for other browsers.

Edit2: Oh, I know what's up with that. If I eliminate width:expression entirely, I have to redo all of my images, and then it won't look disjointed but will have huge tables. Ugh. Can't I have IE max width and tables? Maybe I'll start looking into redoing all my images.

Edit3: Okay I redid all my images and am just letting IE people have a freaking huge table that drags across the screen if they're on high resolutions. xD Anyone dumb enough to be using IE probably doesn't have a big resolution anyway, right >.>

Still if anyone could figure out how to make IE's width expression and multiple tables compatible, please tell me.

o_O
04-15-2008, 03:00 AM
Here are two solutions:
1. Instead of defining the style for all tables, define a class and set name or id of the tables to be affected.

2.
<div class="smallfont" style="margin-bottom:2px">HTML Code:</div><div style="color: black; background-color: white; margin:0px; padding:5px; border:1px inset; width:90%; height:200px; overflow:auto"><code style="white-space: pre; line-height: 13px; font-size: 12px;">&lt;html&gt;
&lt;head&gt;
&lt;title&gt;lol&lt;/title&gt;
&lt;comment&gt;
&lt;style type="text/css"&gt;
table {
/* define style for other browsers */
}
&lt;/style&gt;
&lt;/comment&gt;

&lt;!--[if IE]&gt;
&lt;style type="text/css"&gt;
table {
/* Define style for IE */
}
&lt;/style&gt;
&lt;![endif]--&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></div></div>

Jojee
04-15-2008, 06:56 AM
It still makes the tables mess up I think. Anyway thanks xD I think I'll just let IE users see huge tables, they deserve it I hate them. xD

So I have a different question now~ using PHP, I'm making a quiz, right? I'm using arrays for the responses...

$answers_array = array(
1=> " Yes|1
No|2",

etc

So that's question #1. A yes corresponds with result #1, and No corresponds with result #2. Is there any way I can get an answer to correspond with multiple results? I'm really a PHP noob.

o_O
04-15-2008, 12:39 PM
I'm assuming the "1" in "Yes|1" is some piece of data that needs to accompany the "Yes" here (like order, or points, or rank). :p
You could do something like this:


$answers_array = array(
array('Y' => 2, 'N' => 1),
array('Y' => 1, 'N' => 2),
array('Y' => 1, 'N' => 2),
array('Y' => 2, 'N' => 1),
array('Y' => 1, 'N' => 2),
array('Y' => 1, 'N' => 2));

Then to access your array, use something like:


foreach ($answers_array as $curr_values) {
$y = $curr_values['Y'];
$n = $curr_values['N'];
if ($y > $n) echo 'Y is greater than N';
else if ($y == $n) echo 'Y is the same as N';
else echo 'Y is less than N';
// Do other stuff with Y and N here
}

I'solé
04-27-2008, 07:36 PM
Simple solution:
"Will show up better in Firefox".

Baloki
04-27-2008, 10:57 PM
Simple solution:
"Will show up better in Firefox".

People who don't make an effort to code cross-browser or just put a cop-out on their sites shouldn't be allowed to make websites.

Krelian
04-27-2008, 11:32 PM
Yeah, it's just not acceptable to optimize for one browser only and exclude people with other browsers. A website has to be tested with different browsers. It would be best of course to test with all possible browsers, but since that's hardly possible it should at least be tested and working with Firefox and IE.

crono_logical
04-27-2008, 11:34 PM
Simple solution:
"Will show up better in Firefox".

People who don't make an effort to code cross-browser or just put a cop-out on their sites shouldn't be allowed to make websites.That why I stick to coding my sig rather than the frontsite :p

o_O
04-28-2008, 12:02 AM
I just think of having SVG capabilities as a bonus for using a real browser. :p

crono_logical
04-28-2008, 12:06 AM
And png transparency too? Or have they bothered fix that in IE now? :p Page rendering differences is one thing, but not supporting standard things or newer technologies is lame :p

Rantz
04-28-2008, 08:08 AM
The PNG alpha channel support is implemented in IE7.

Jessweeee♪
04-28-2008, 08:42 PM
Simple solution:
"Will show up better in Firefox".

People who don't make an effort to code cross-browser or just put a cop-out on their sites shouldn't be allowed to make websites.

People should definitely as least code them to work in both IE and Firefox ;_;

...speaking of which, I thought I had the image maps on the website linked in my signature working in IE, but I was wrong. Could anyone show me what I did wrong ^-^;;

leilei
04-30-2008, 12:03 AM
The PNG alpha channel support is implemented in IE7.
It's also implemented in IE5!



...for the Mac.
Not only that but image resampling with filter, so those bad html size thumbnails look suddenly good..