Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > is my HTML screwed up?

is my HTML screwed up?
Thread Tools
Mac Enthusiast
Join Date: Nov 2001
Location: Washington, DC 20009
Status: Offline
Reply With Quote
Dec 29, 2002, 09:22 PM
 
I'm confused as to why the top cell (the one that is the bright, hideous yellow) is larger than the size of the image. The test image that I am using is 780x100 pixels and is simply two horizontal bars on a transparent background. Can someone view this page (and source code) and please tell me why the top cell isn't the size of the image? I colored the cell bright yellow so it can be more easily distinguished. I want the maroon colored bars to push right up against the white boxes, but for some reason it's not. I notice sometimes that when I refresh several times, the size of the top cell goes to the size of the image, but after one more refresh, the top cell seems to get 10px or so larger than the image.

I'll be very thankful if someone can point out what I've messed up or why this is happening.

http://www.nancysells.net/temp/test2.php

Thanks
Just my $.02 :-)
Ti Powerbook 1Ghz w/ Superdrive ......and lovin' it! :)
     
Mac Elite
Join Date: Oct 2000
Location: Baltimore, MD
Status: Offline
Reply With Quote
Dec 29, 2002, 11:00 PM
 
Code:
<html> <head> <title>The E Spot</title> </head> <body topmargin="0" leftmargin="0" marginheight="0" marginwiddth="0" bgcolor="#FBE794"> <table width="780" height="540" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="0" bgcolor="yellow" valign="bottom" width="0"> <img src="http://www.nancysells.net/temp/./images/testimage.gif" border="0" alt="Something here" height="100" width="780"></td> </tr> <tr> <td height="400"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="22"></td> <td width="2" bgcolor="#ffffff"></td> <td width="10"></td> <td width="746" height="500" bgcolor="#000000"> main content </td> </tr> </table> </td> </tr> <tr> <td height="40" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="22"></td> <td width="2" height="10" bgcolor="#000000"></td> <td width="756"></td> <tr> <td width="22"></td> <td width="758" bgcolor="#FFFFFF" colspan="2"></td> </tr> <tr> <td width="22"></td> <td width="758" align="right" colspan="2">Copyright</td> </tr> </table> </td> </tr> </table> </body> </html>
you had a errant line break between your testimage.gif img tag and the close cell </td> tag
     
milf  (op)
Mac Enthusiast
Join Date: Nov 2001
Location: Washington, DC 20009
Status: Offline
Reply With Quote
Dec 30, 2002, 01:42 AM
 
An errant line break? Do you mean a stray [br] tag after the testimage.gif? I didn't see any misplaced tags, but what I did what take out the extra space between lines. That seemed to strangely fix the problem, but why I'm not sure. I'm not sure how extra lines could change the HTML code. If it were an extra BR tag, I'd understand. Is it because of my editor? I'm using project builder to write my HTML code because bbedit was doing wierd things whenever I'd try to enter a double quote.
Just my $.02 :-)
Ti Powerbook 1Ghz w/ Superdrive ......and lovin' it! :)
     
Mac Elite
Join Date: Oct 2000
Location: Baltimore, MD
Status: Offline
Reply With Quote
Dec 30, 2002, 06:10 AM
 
Originally posted by milf:
An errant line break? Do you mean a stray [br] tag after the testimage.gif? I didn't see any misplaced tags, but what I did what take out the extra space between lines. That seemed to strangely fix the problem, but why I'm not sure. I'm not sure how extra lines could change the HTML code. If it were an extra BR tag, I'd understand. Is it because of my editor? I'm using project builder to write my HTML code because bbedit was doing wierd things whenever I'd try to enter a double quote.
No, not an extra (br) tag, just a stray hit of the return key. If you have any line breaks (not necc. (br)) in a (td) tag (within) I've seen browsers put extra space in the cell. Thats why I like BBedits "optimize" tool, it gets rid of all that crud.
     
milf  (op)
Mac Enthusiast
Join Date: Nov 2001
Location: Washington, DC 20009
Status: Offline
Reply With Quote
Dec 30, 2002, 02:04 PM
 
Strange. I hadn't noticed the extra line in the (td) tag, but whatever I did it seemed to work.

The Lite version of BBedit doesn't seem to have the optimize tool. I'll have to look in to getting the full version. Just wish it wasn't so expensive.
Just my $.02 :-)
Ti Powerbook 1Ghz w/ Superdrive ......and lovin' it! :)
     
Forum Regular
Join Date: Jul 2002
Location: Ireland
Status: Offline
Reply With Quote
Jan 6, 2003, 08:52 AM
 
Originally posted by milf:
Strange. I hadn't noticed the extra line in the (td) tag, but whatever I did it seemed to work.

The Lite version of BBedit doesn't seem to have the optimize tool. I'll have to look in to getting the full version. Just wish it wasn't so expensive.
download bbtidy it is free and works with bbedit lite...
     
   
Thread Tools
Forum Links
Forum 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 On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:00 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2