Web Design Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignWeb Design 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 Dev Shed Forums Sponsor:
  #1  
Old February 8th, 2005, 08:22 AM
Decebal Decebal is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 25 Decebal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 20 m 45 sec
Reputation Power: 0
Getting an underline in a table without space

We would like to underline some headings in tables. We tried to do it with the folowing code (it is not PHP code, but in this way it looks better):
PHP Code:
<table border="0" width="100%">
  <
tr>
    <
th colspan="2" align="left">
      
Calling Info<br>
      <
hr>
    </
th>
    <
th colspan="4">&nbsp;</th>
  </
tr>
  <
tr>
    <
th align="right">Date</th>
    <
th align="right">Time</th>
    <
th align="right">Duration</th>
    <
th align="right">Dialed Number</th>
    <
th align="right">Calling Number</th>
    <
th align="right">Costs</th>
  </
tr>
  <
tr>
    <
th colspan="6" height="2">
      <
hr height="2">
    </
th>
  </
tr>
  <
tr>
    <
td align="right">30-1-2002</td>
    <
td align="right">17:14</td>
    <
td align="right">0:34:02</td>
    <
td align="right">6027846</td>
    <
td align="right">270</td>
    <
td align="right">0.96 &euro;</td>
  </
tr>
  .
  .
  .
</
table


In principle this works, the only problem is that there is to much room between the titles and the line. I tried to get things closer to eachother with the height attribute, but this does not work. I can use it to make the distance bigger, but not smaller. Is there a way to get the <hr> line close to the text?

Reply With Quote
  #2  
Old February 8th, 2005, 04:44 PM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Dev Shed God 22nd Plane (15500 - 15999 posts)
 
Join Date: Jul 2004
Location: USA
Posts: 15,944 Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Months 3 Weeks 5 Days 12 h 14 m 45 sec
Reputation Power: 1522
Code:
th {
text-decoration: underline;
}

Code:
th {
border-bottom: 1px solid #000000;
}
__________________
Spreading knowledge, one newbie at a time.

Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Dynamic Site Solutions

Design/program for Firefox (and/or Opera), apply fixes for IE, not the other way around.

I'm looking for new clients.

Reply With Quote
  #3  
Old February 8th, 2005, 07:01 PM
Decebal Decebal is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 25 Decebal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 20 m 45 sec
Reputation Power: 0
Quote:
Originally Posted by Kravvitz
Code:
th {
text-decoration: underline;
}

Code:
th {
border-bottom: 1px solid #000000;
}

The second one does what I want. Only one little snag, there are small gaps between the cells. Can there be done something against this?

Reply With Quote
  #4  
Old February 8th, 2005, 07:07 PM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Dev Shed God 22nd Plane (15500 - 15999 posts)
 
Join Date: Jul 2004
Location: USA
Posts: 15,944 Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 8th Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Months 3 Weeks 5 Days 12 h 14 m 45 sec
Reputation Power: 1522
Unfortunately, you can't put borders on <tr> elements.
Code:
<table border="0" width="100%" cellspacing="0">

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignWeb Design Help > Getting an underline in a table without space


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


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





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway