HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old October 28th, 2009, 03:27 AM
Drazen Drazen is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 27 Drazen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 h 10 m 30 sec
Reputation Power: 0
HTML - Problem with a Table

Hi,
I have a problem with a Table, I'm sure this is a simple error, but i've spent hours trying to sort it and can't.

I'm trying to create 3 Cells, each with rounded edges and red stripes along the top and bottom.
So I've created a table 9 x 9 and inserted an image in the top and bottom cells showing rounded edges. I've put all padding and spacing to 0 and it looks good..... In internet exporer 8.

If i view it in IE 7 or 'Compatability mode on IE8' it inserts a gap between my cells vertically.

you can see it HERE

I am very new to CSS, I wrote a website a few years ago, and I am re-building it, as its a bit unstable.
oh, and i'm using Expresions if that helps any.

This is my code
Code:
<style type="text/css">
.style1 {
	background-color: #000000;
}
.style3 {
	background-color: #000000;
	color: #FFFFFF;
}
.style4 {
	color: #FFFFFF;
}
.style5 {
	text-align: center;
}
</style>
</head>

<body>

<table cellspacing="0" style="width: 750px; height: 244px;" align="center" cellpadding="0">
<tr>
	<td class="style5" style="width: 149px; height: 21px">
	<img alt="" height="21" src="red_upper.jpg" width="150"/></td>
	<td style="width: 5px; height: 21px"></td>
	<td style="height: 21px"></td>
	<td style="width: 5px; height: 21px"></td>
	<td style="width: 150px; height: 21px">
	<img alt="" height="21" src="red_upper.jpg" width="150" /></td>
</tr>

<tr>
		<td class="style1" style="width: 149px"><br class="style4" />
		<br class="style4" />
		<span class="style4">Button Window</span><br class="style4" />
		<br class="style4" />
		</td>
		
		<td style="width: 5px"></td>
		<td class="style1"><br class="style4" />
		<br class="style4" />
		<span class="style4">Main Text Area</span></td>
		<td class="style4" style="width: 5px"></td>
		<td class="style3" style="width: 150px">Left window</td>
</tr>

<tr>
	<td style="height: 21px; ">
	<img alt="" height="21" src="red_Lower.jpg" width="150" /></td>
	<td style="height: 21px">&nbsp;</td>
	<td style="height: 21px">&nbsp;</td>
	<td style="height: 21px">&nbsp;</td>
	<td style="height: 21px">
	<img alt="" height="21" src="red_Lower.jpg" width="150" /></td>
</tr>
</table>


any help or advice would be great
Thanks in advance
Tony

Reply With Quote
  #2  
Old October 28th, 2009, 04:43 AM
Drazen Drazen is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 27 Drazen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 h 10 m 30 sec
Reputation Power: 0
ahhh,
I think I've sorted it now. I just set the vertical alignment to bottom and top for images.

But the table still adjusts its self a little when I change compatability on IE8, is this normal ?

Reply With Quote
  #3  
Old October 28th, 2009, 06:39 PM
MEdelman MEdelman is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2009
Posts: 42 MEdelman User rank is Corporal (100 - 500 Reputation Level)MEdelman User rank is Corporal (100 - 500 Reputation Level)MEdelman User rank is Corporal (100 - 500 Reputation Level)MEdelman User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 15 h 58 m 33 sec
Reputation Power: 2
It's there because...

If I understand correctly, the vertical gap is there because you told it to be there. You have a five column table, and you have three columns (1, 3, 5) with something displayed, and two columns (2, 4) with nothing in them. If you want to get rid of the vertical gaps, try this:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="en-gb" http-equiv="Content-Language" />
<meta content="text/html; charset=windows-1252" http-equiv="Content-Type" />
<title>Untitled 1</title>
<style type="text/css">
.style1 {	background-color: #000000; }
.style3 {	background-color: #000000; color: #FFFFFF; }
.style4 { 	color: #FFFFFF; }
</style>
</head>
<body>
<table cellspacing="0" style="width: 750px; height: 244px;" align="center" cellpadding="0">
  <tr>
    <td style="width: 149px; height: 21px" valign="bottom">
      <img alt="" height="21" src="red_upper.jpg" width="150"/>
    </td>
    <td style="height: 21px"></td>
    <td style="width: 150px; height: 21px" valign="bottom">
      <img alt="" height="21" src="red_upper.jpg" width="150" />
    </td>
  </tr>
  <tr>
    <td class="style1" style="width: 149px"><br class="style4" />
      <br class="style4" />
      <span class="style4">Button Window</span><br class="style4" />
      <br class="style4" />
    </td>
    <td class="style1"><br class="style4" />
      <br class="style4" />
      <span class="style4">Main Text Area</span>
    </td>
    <td class="style3" style="width: 150px">Left window</td>
  </tr>
  <tr>
    <td style="height: 21px; " valign="top">
      <img alt="" height="21" src="red_Lower.jpg" width="150" />
    </td>
    <td style="height: 21px">&nbsp;</td>
    <td style="height: 21px" valign="top">
      <img alt="" height="21" src="red_Lower.jpg" width="150" />
    </td>
  </tr>
</table>
</body>
</html>
BTW, I just added a border to the table (border="1") to see what was happening .

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > HTML - Problem with a Table


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek