PDA

View Full Version : Coding Error



Ted Varnson
Sep 10th, 2004, 09:45 PM
There is something in my code that is not rendering correct and for the life of me I cannot find it. Something is wrong with the way the logo is shwn, the images don't line up when you use anything but Internet Explorer.

Here is my site: http://www.thekryptonian.com

Here is the code for the logo

<table border="0" cellpadding="0" cellspacing="0" width="780">

<tr>
<td width="780" background="images/tk3/forum/misc/top_a.jpg" colspan="2">
<img border="0" src="images/tk3/forum/misc/top_a.jpg" width="1" height="12"></td>
</tr>
<tr>
<td width="780" background="images/tk3/forum/misc/top_b.jpg" colspan="2" height="3">
<img border="0" src="images/tk3/forum/misc/top_b.jpg" width="1" height="3"></td>
</tr>


<tr>

<td width="780" colspan="2" height="88">
<table width="100%" border="0" cellspacing="0" cellpadding="0" background="images/tk3/forum/misc/logo_a.jpg">
<tr>
<td><a href="/"> <img border="0" src="images/tk3/forum/misc/logo_a_half.jpg" height="88" /></a></td>
<td><script type="text/javascript"><!--
google_ad_client = "pub-3166518069626841";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_channel ="";
google_ad_type = "text_image";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td>
</tr>
</table>

</td>
</tr>
<tr>

<td width="220" height="38"><a href="/"> <img border="0" src="images/tk3/forum/misc/logo_b.jpg" width="220" height="38" /></a></td>
<td width="560" background="images/tk3/forum/misc/logo_c.jpg" valign="top" height="38">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>

<td width="555" height="7"> <img border="0" src="images/blank7px.gif" width="1" height="7" /></td>


<td width="5" height="7"> <img border="0" src="images/blank7px.gif" width="1" height="7" /></td>
</tr>
<tr>
<td width="555" id="black">
<p align="right"><b><font size="1" color="#000000"><a href="/">Home</a>
| <a href="forum.php">Forum</a> | <a href="donate.php">Donate</a>
| <a href="index.php?action=links">Links</a> | <a href="sendmessage.php">Contact</a></font></b></p></td>


<td width="5" height="1"> <img border="0" src="images/blank_5px_w.gif" width="5" height="1" /></td>
</tr>
</table>
</td>
</tr>



</table>
<!-- /logo -->

bradyj
Sep 10th, 2004, 10:05 PM
You might want to fix some of the errors in your code:
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.thekryptonian.com%2F

Looks like there may be an open tag somewhere -- IE thinks it's just regular HTML so it probably ignores the mistake, but all the other browsers will catch it. Also, you have some multiple id's, you can't do that -- if you want to use (one I see is 'black') mutliple times, then make it a class rather than an id. You need to close your image tags as well with a space and /> -- and make sure all your tags are lowercase, I see some uppercase. We can fix all this, post up if you have questions about the errors!

P.S. -- I'm a batman nut, I've got almost every comic from 84' to 94'!

squirellplaying
Sep 10th, 2004, 10:11 PM
P.S. -- I'm a batman nut, I've got almost every comic from 84' to 94'!

ummm.......His site is about superman. ;)

bradyj
Sep 10th, 2004, 10:29 PM
ummm.......His site is about superman. ;)

Yes, but there's a Batman link in there too!

AaronW
Sep 11th, 2004, 03:03 AM
<robin voice>Holy table bloat, Batman!</robin voice>

Hehe. I don't care that it's a table, but felt the comment would be relevant in one way or another... 'Tis a lot of table. Cool looking site, nonetheless :)

tsguitar2004
Sep 11th, 2004, 04:31 AM
Also, grouping your CSS somehow will help you identify what things control which aspects of the site. Furthermore, if you move the CSS to an external document, you'll have an easier time of applying these styles to more than one page. You can create one CSS to control the tables, one for layout, etc. and then just call on each one as you need them. Right now, the CSS is tough to decypher and a lot to scroll past every time you want to change the content of the page.
-ts

P.S. Reading Superman/Batman, Brady?

bradyj
Sep 11th, 2004, 05:10 AM
P.S. Reading Superman/Batman, Brady?

Maybe:)

Any luck with getting it aired out?

tsguitar2004
Sep 11th, 2004, 05:19 AM
Maybe:)

Any luck with getting it aired out?
Aired out??
-ts

bradyj
Sep 11th, 2004, 05:33 AM
Aired out, kinda' like when a car starts spewing exhaust while your driving -- let the bad things out, good things in. Did you get the bad code out, good code in?

tsguitar2004
Sep 11th, 2004, 06:34 AM
Workin' on it... Fixed one thing, now another is broken, but aaaaaaaaalmost.

Though I haven't taken on the challenge of removing the tables.
-ts

gohankid77
Sep 11th, 2004, 06:42 AM
I'm not sure you would want to remove the tables! That would cause some undue frustration for someone who isn't the author of the original page!

tsguitar2004
Sep 11th, 2004, 08:15 AM
Ok, here it is.
http://scweb.esuhsd.org/projects/test/kryptonian.html

Whoever your host is doesn't want others hotlinking, so just copy the file, put it on your server, and view it. Then give a link; I'd like to check it out to see if it worked. When I look at it in Opera 7.5/pc, there is trouble with the width. I think it may be some hotlinking prevention from your host, though, not trouble with the code. When I copy your exact file to my hard drive, without changing anything except to go through and put in absolute addresses to images, Opera gives me trouble with the width. Your site on your server looks fine in Opera. So, again, I think it will look fine if you copy my file and put it on your server.

Real quick, the tables you had those top images in were filled with spacer images and that messed with spacing in NS. I took out the spacer images, put your menu into a list, changed margins and padding on a few things, and it's sitting pretty in IE6 and NS7.1 on pc.
-ts

AaronW
Sep 11th, 2004, 01:27 PM
3044 lines of cSS + markup on that page. That's insane. Might tackle a table-less version, but it'll be a waste of time seeing as his site seems to be powered by vBulletin (and switching that over to CSS would drive anyone nuts).

gohankid77
Sep 11th, 2004, 06:20 PM
Leave vBulletin alone! It will be a waste of time to change it! Cross-browser compatibility, screen resolutions... *shudder* I wouldn't bother.

Ted Varnson
Sep 12th, 2004, 03:21 AM
Thanks a lot for pointing me in the right direction. I have it all fixed now and it feels great! It bothered me that I couldn't browse my own site with Firefox.