Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    May 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need help! Im getting a space between my images in tables

    Hello everybody!

    First time posting here in these forums but I have been coding in HTML since 2000. This seems like a good forum so I decided to come here to help solve a problem I have.

    Im trying to build my first web site with the DotNetNuke Framework and im learning how to create skins. I am designing the table where all the images are to go myself because my boss doesnt want me to use any of the Adobe or Macromedia MX products to generate the HTML, hes like that, hes a manly man. No biggie, cause I am capable of doing the complex table structures to get all the images and web site as it should be, but Im having the following problem.



    *I blurred out the logo and info of the company this is for, figured it wouldnt be very profesional of me*
    As you can see, Im trying to build the table and inserting the images, but for some reason I am getting some space at the bottom of the images. On the image to the left, is the IE version and in the middle is the same version but I highlighted the images so you can see the spaces. The image on the right is the Mozilla version and it works.

    I have tried various things to fix it, and using the align attribute in the img tag seeemed to work, but as soon as I applied it to the other img tags, I still got spaces.

    Does anyone know why this is happening and how it can be fixed manually?

    Heres the code, just in case

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title></title>
    <style type="text/css">
    body
    {
    background-image:url(bg.jpg);
    margin:0px 0px 0px 0px;
    }
    .one
    {
    position:absolute;
    top:-2px;
    }
    </style>
    </head>
    <body>
    <table cellpadding="0" cellspacing="0" align="center" border="0">
    	<tr>
    		<td bgcolor="#FFFFFF" background="site_r4_c1.jpg" width="39"></td>
    		<td bgcolor="#FFFFFF" width="300">
    			<table cellpadding="0" cellspacing="0" border="0">
    				<tr>
    					<td>
    						<table cellpadding="0" cellspacing="0">
    							<tr>
    								<td>
    								<img src="site_r1_c2.jpg" border="0">								
    								</td>
    								<td>
    								</td>
    							</tr>
    							<tr>
    								<td>
    								<img src="site_r2_c2.jpg" border="0">
    								</td>
    								<td>
    								</td>
    							</tr>						
    						</table>
    					</td>
    				</tr>
    				<tr>
    					<td>
    					</td>
    				</tr>
    				<tr>
    					<td>
    					</td>
    				</tr>								
    			</table>
    		</td>
    		<td  bgcolor="#FFFFFF" background="site_r4_c14.jpg" width="44"></td>
    	</tr>
    	<tr>
    		<td bgcolor="#FFFFFF" width="39">
    		<img src="site_r5_c1.jpg">
    		
    		</td>
    		<td bgcolor="#FFFFFF">
    		</td>
    		<td bgcolor="#FFFFFF" width="44">
    		<img src="site_r5_c14.jpg">
    		</td>
    	</tr>
    </table>
    
    
    </body>
    </html>

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,700
    Thanks
    6
    Thanked 1,011 Times in 984 Posts
    Welcome gentrinity,

    Solution: http://developer.mozilla.org/en/docs...ysterious_Gaps

    If I may pose some critique: Your statement of “I have been coding in HTML since 2000” made me suspicious as people talking about coding HTML and not mentioning CSS at all usually use tables for layout and actually don’t use CSS at all (or just barely). And your post proved that my suspicion was correct. CSS was around in 2000 already, and so was semantic HTML so you had enough time to learn how to do it right.

    To make it short: Tables for layout is stupid. You should go with time and use semantic code and CSS. Tables are only for tabular data (e.g. sports results, phone directory, etc.). Doing it right will bring you a lot of respect among the community.

  • #3
    New to the CF scene
    Join Date
    May 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Convincing me is not the problem, I respect your opinion and I have never really designed with tables. Most of my work has been Flash sites and this is one of the few times Ive had to really dig in. I do know CSS though, but I learned it pretty recently, I started last year. I do admit I could use a better refresher course on my markup skills as they stand to be a bit cleaner.

    No matter how much I wish to change these coding principles, they are my boss's wishes and i have to respect them. I will however make an attempt to make him read the articles you provided. Dont know how well that is going to go though.

    Thanks alot for your help!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •