4 Replies - 16687 Views - Last Post: 27 August 2009 - 11:11 PM

#1 timlarsson  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 29-July 09

[Solved] Table row height issue

Posted 27 August 2009 - 11:47 AM

I assume there's a really simple solution to this, but it just won't work whatever I try!

I want the table row's height to be around 12 or 13 pixles, and i try with basically everything, but it still is 40 px high!

I'm using firebug and the latest firefox and ie8 to view, and debug and try things... It looks good in ie7 and below... but i want to fix it for later browsers.

It's probably just something small that I missed but I can't figure it out!

http://byggjarnhandl...t.php?soknamn=e

NOTE: This is a (X)HTML question, even though there's PHP code below.

print("<table width=\"100%\" border=\"0\">");

while($rader= mysql_fetch_row($visa)) { // $row blir FALSE när raderna är slut
				print("<tr>");
				if($rader[3] == 1)
				{
				print("<td width=\"11\" height=\"11\"><p><img src=\"kforetag11px.jpg\"></p></td>");
				}
				else
				{
				print("<td width=\"11\" height=\"11\"><p><img src=\"kforetag11px_tom.jpg\"></p></td>");
				}
				if($rader[2] == 1)
				{
				print("<td width=\"11\" height=\"11\"><p><img src=\"traexpert11px.jpg\"></p></td>");
				}
				else
				{
				print("<td width=\"11\" height=\"11\"><p><img src=\"traexpert11px_tom.jpg\"></p></td>");
				}
				print("<td height=\"11\"><p><a href=\"resultat_entest.php?id=$rader[0]\">$rader[1]</a></p></td>");
				
				print("</tr>");
				} // end while
			print("</table><br/>\n"); 


This post has been edited by timlarsson: 27 August 2009 - 11:13 PM


Is This A Good Question/Topic? 0
  • +

Replies To: [Solved] Table row height issue

#2 tommyflint  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 34
  • View blog
  • Posts: 679
  • Joined: 24-July 08

Re: [Solved] Table row height issue

Posted 27 August 2009 - 01:23 PM

You could create a new class like so
.tablerow
{
line-height:11px;
}


and just apply it to either the whole table or just the rows you require to have this height

hope that works

tommyflint

This post has been edited by tommyflint: 27 August 2009 - 01:23 PM

Was This Post Helpful? 0
  • +
  • -

#3 timlarsson  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 29-July 09

Re: [Solved] Table row height issue

Posted 27 August 2009 - 04:13 PM

Thanks for the advice, but unfortunately it doesn't help :( I'm absolutely clueless about this. something that just works sometimes, and sometimes not!
Was This Post Helpful? 0
  • +
  • -

#4 tommyflint  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 34
  • View blog
  • Posts: 679
  • Joined: 24-July 08

Re: [Solved] Table row height issue

Posted 27 August 2009 - 05:07 PM

I'm guessing the images arent bigger than 11px high as this will increase the height?

tommyflint

Edit: Try removing the <p> tags

This post has been edited by tommyflint: 27 August 2009 - 05:09 PM

Was This Post Helpful? 1
  • +
  • -

#5 timlarsson  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 29-July 09

Re: [Solved] Table row height issue

Posted 27 August 2009 - 11:11 PM

Oh! Yes this was it!

I totally forgot that you didn't have to use <p> in a <td> block (in terms of validity of xhtml strict).

Thank you!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1