Current location: Hot Scripts Forums » General Web Coding » CSS » I need help tracking down this IE issue.


I need help tracking down this IE issue.

Reply
  #1 (permalink)  
Old 10-06-06, 06:37 PM
nova912's Avatar
nova912 nova912 is offline
Code Guru
 
Join Date: Sep 2004
Location: Traverse City, MI, USA
Posts: 821
Thanks: 0
Thanked 0 Times in 0 Posts
I need help tracking down this IE issue.

Well what im doing i appending a table to a <div> with multiple tables inside of it already. Now it's working fine on FireFox and Safari, but when i add a table in IE i get this little annoying querk, it looks like the table i added has an invisible 2 to 3 pixel border or padding around it. I have tried to use nagitive margins but it only effects the tables veritcal margin and i dont think it's the solution to this problem.

This is the DIV when the page loads. The class "fullWidth" = 100% width.
Code:
<div id="searchCriteria">	
	<table width="100%" border="0" cellspacing="0" cellpadding="0" id="additionalCriteria1">
		<tr>
			<td><?php echo $menu['search_type']; ?></td>
		</tr>
		<tr>
			<td><input class="fullWidth" type="text" name="basic_input" value="" size="24"></td>
		</tr>
	</table>
</div>
This is how i construct and add another table below it.
Code:
			// BUILD TABLE
			var table = document.createElement('table')
			table.setAttribute("cellspacing", "0");
			table.setAttribute("cellpadding", "0");
			table.setAttribute("border", "0");
			table.width = '100%';
			table.id = 'additionalCriteria' + (hiddenInput('num') + 1);
			
			// BUILD ROWS
			var tableBody = document.createElement('TBODY');
			var tableRow1 = document.createElement('tr');
			var tableRow1Data = document.createElement('td');
			var tableRow2 = document.createElement('tr');
			var tableRow2Data = document.createElement('td');
						
			// CONSTRUCT TABLE
			table.appendChild(tableBody);
			tableBody.appendChild(tableRow1);
			tableRow1.appendChild(tableRow1Data);
			tableRow1Data.appendChild(menu);
			tableBody.appendChild(tableRow2);
			tableRow2.appendChild(tableRow2Data);
			tableRow2Data.appendChild(textBox);
			
			// ADD TABLE
			document.getElementById('searchCriteria').appendChild(table);
I think i have created a clone of the default TABLE already in the DIV but for some reason that does not seem to be the case. I for the life of me am unable to find the detail i am missing. I need a bone thrown my way please =X
Reply With Quote
  #2 (permalink)  
Old 10-06-06, 09:09 PM
jfulton's Avatar
jfulton jfulton is offline
Community VIP
 
Join Date: Apr 2006
Location: Los Angeles, CA
Posts: 660
Thanks: 0
Thanked 0 Times in 0 Posts
Since it is only affecting IE, it sounds like a box model problem...the padding issue might be on the 'container' div. What kind of css styles are being applied to the div #searchCriteria? If you have the DOM Inspector installed in Firefox, see what that says about the javascript generated tables too...

Check out this link and try playing with your doctype to see how that changes things.
Reply With Quote
  #3 (permalink)  
Old 10-07-06, 08:35 AM
TwoD TwoD is offline
Community VIP
 
Join Date: Sep 2003
Location: 404
Posts: 1,813
Thanks: 0
Thanked 0 Times in 0 Posts
Yes, this is probably a CSS issue.
Post a link to a page where the problem can be seen and I'll move this to the CSS section.

It might also be helpful if you take the code generated by the script and put it on a 'pre-rendered' page. Then it would be easier to debug the CSS since you could modify the source directly without changing the script.
__________________
[W3Schools - learn all about the standards.] [QuirksMode - Browser Quirks] [MS's Online Reference Docs] [DOM in Gecko.]
Please pay attention to stickys, announcements and forum rules, thank you.
Please also remember Code Wrappers and [SOLVED] Marking, this helps everyone.
Reply With Quote
  #4 (permalink)  
Old 10-07-06, 09:07 AM
mab's Avatar
mab mab is offline
Community VIP
 
Join Date: Oct 2005
Location: Denver, Co. USA
Posts: 2,674
Thanks: 0
Thanked 0 Times in 0 Posts
This is not a comment about the problem in this thread - sad to say, but the CSS forum should be renamed "display problem (does not work the same in all browsers)" as that is what the title of most of the threads are. LOL
__________________
Error checking, error reporting, and error recovery. If your code does not have these to get it to tell you why it is not working, what makes you think someone in a programming forum will be able to tell you why it is not working???
Reply With Quote
  #5 (permalink)  
Old 10-07-06, 11:49 AM
nova912's Avatar
nova912 nova912 is offline
Code Guru
 
Join Date: Sep 2004
Location: Traverse City, MI, USA
Posts: 821
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by mab
This is not a comment about the problem in this thread - sad to say, but the CSS forum should be renamed "display problem (does not work the same in all browsers)" as that is what the title of most of the threads are. LOL
Good point, well i put this in the Javascript forum b/c i was using JS to add it to a div, and the same styles are applied to the tables, so i figured it was a DOM issue. Ill try and adapt this script to an example page for you in a few minuets.

Well its not done yet of course but here is the primitive example of it.
http://www.authenticdesign.net/adcsm/ticket_view.php

Last edited by nova912; 10-07-06 at 11:51 AM.
Reply With Quote
  #6 (permalink)  
Old 10-07-06, 04:23 PM
nova912's Avatar
nova912 nova912 is offline
Code Guru
 
Join Date: Sep 2004
Location: Traverse City, MI, USA
Posts: 821
Thanks: 0
Thanked 0 Times in 0 Posts
Here is what i got from the DOM inspector (it's attached), what i notice right off the bat is that there are random [object Text] all over the document.. and its value is like "[random number of white spaces]", could this be what is causing this? Thank for your help.
Attached Images
File Type: jpg DOM Inspector Results.JPG (14.2 KB, 82 views)
Reply With Quote
  #7 (permalink)  
Old 10-07-06, 06:41 PM
nova912's Avatar
nova912 nova912 is offline
Code Guru
 
Join Date: Sep 2004
Location: Traverse City, MI, USA
Posts: 821
Thanks: 0
Thanked 0 Times in 0 Posts
AHHHHHHHHHHHHHHHH HAAAAAAAAAAAAAAA!!!!!! friggin found it.

Code:
table.cellSpacing = '0';
table.cellPadding = '0';
setAttribute does not work in IE when you use

setAttribute("cellpadding", "0"); or setAttribute("cellspacing", "0");

BUT it does work in FireFox and Safari... gotta love it haha.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Issue Tracking and Task management SlackeR Script Requests 8 10-05-05 04:29 PM
Language issue in from property, Please Help AskAR ASP 0 08-10-05 06:40 AM
need an issue tracking system webcrab20042005 ASP 1 07-28-05 07:11 AM
URL Tracking Code Stripper DevilDog Script Requests 0 02-17-05 09:24 AM
Autoresponders, Lists, Ad Tracking, Affiliate Tracking & Product Delivery all in one Iceblaze Script Requests 0 05-10-04 03:37 AM


All times are GMT -5. The time now is 01:53 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.