10 replies [Last post]
Polar
Offline
newbie
Last seen: 15 years 7 weeks ago
Timezone: GMT-6
Joined: 2005-06-28
Posts: 3
Points: 0

Hi,

How can I make the first row in my table higher than the rest.
It's a bound DataGrid so I have to use a css class.

Can I use first-item?

Something like tr.grid:firstItem { height: 30px; line-height:30px; }

Thanks

DeprecatedDiva
DeprecatedDiva's picture
Offline
Enthusiast
NW Louisiana
Last seen: 13 years 35 weeks ago
NW Louisiana
Timezone: GMT-6
Joined: 2005-06-12
Posts: 135
Points: 0

Make first row in table taller

mayby something like this...gotta check my table tags but I think this is what you're looking for.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
<html>
<head>
<style type="text/css">
<!--
thead { height: 30px; line-height:30px; }
-->
</style>
</head>

<body>
<table>

<thead><tr><th></th></tr></thead>

<tfoot><tr><td></td></tr></tfoot>

<tbody><tr><td></td></tr></tbody>

</table>
</body></html>

/edited by tph - I couldn't resist :twisted:

DeprecatedDiva

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 21 weeks 18 hours ago
Joined: 2004-06-30
Posts: 9668
Points: 801

Make first row in table taller

thead and tfoot must come before tbody.

Verschwindende wrote:
  • CSS doesn't make pies

DeprecatedDiva
DeprecatedDiva's picture
Offline
Enthusiast
NW Louisiana
Last seen: 13 years 35 weeks ago
NW Louisiana
Timezone: GMT-6
Joined: 2005-06-12
Posts: 135
Points: 0

Make first row in table taller

Much appreciated TPH. Since I had not previously used the thead and tfoot tags, I had never researched them and was unaware of the order. Laughing out loud

DeprecatedDiva

Lorraine
Lorraine's picture
Offline
Elder
UK
Last seen: 13 years 51 weeks ago
UK
Timezone: GMT+1
Joined: 2005-01-04
Posts: 1001
Points: 0

Make first row in table taller

Diva
Very gracious of you not to comment on the inconsistency that

Quote:
tfoot must come before tbody

in the light of the definitive code posted above. Wink

DeprecatedDiva
DeprecatedDiva's picture
Offline
Enthusiast
NW Louisiana
Last seen: 13 years 35 weeks ago
NW Louisiana
Timezone: GMT-6
Joined: 2005-06-12
Posts: 135
Points: 0

Make first row in table taller

Lorraine wrote:
Diva
Very gracious of you not to comment on the inconsistency that
Quote:
tfoot must come before tbody

in the light of the definitive code posted above. Wink

:oops: Laughing out loud code updated with a bare shell page.

DeprecatedDiva

Lorraine
Lorraine's picture
Offline
Elder
UK
Last seen: 13 years 51 weeks ago
UK
Timezone: GMT+1
Joined: 2005-01-04
Posts: 1001
Points: 0

Make first row in table taller

Diva
Did you notice how a post just automagically changed. The one where "someone" edited your original code to make the definitive version :?:

DeprecatedDiva
DeprecatedDiva's picture
Offline
Enthusiast
NW Louisiana
Last seen: 13 years 35 weeks ago
NW Louisiana
Timezone: GMT-6
Joined: 2005-06-12
Posts: 135
Points: 0

Make first row in table taller

Lorraine wrote:
Diva
Did you notice how a post just automagically changed. The one where "someone" edited your original code to make the definitive version :?:
Gee! It's magic! Laughing out loud

DeprecatedDiva

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 21 weeks 18 hours ago
Joined: 2004-06-30
Posts: 9668
Points: 801

Make first row in table taller

Quote:
<thead> and <tfoot> can be used to provide a row of headings at the top and bottom of a table. These are potentially very useful for long tables that extend over more than one page since they enable the header and footer to be printed on each page. Also, with appropriate browser support, they will allow the body of a table to be scrolled independently while the headings remain on the screen. In the future, this is likely to be very useful for users of handheld devices with small screens.

Except it doesn't print in IE Evil

Verschwindende wrote:
  • CSS doesn't make pies

DeprecatedDiva
DeprecatedDiva's picture
Offline
Enthusiast
NW Louisiana
Last seen: 13 years 35 weeks ago
NW Louisiana
Timezone: GMT-6
Joined: 2005-06-12
Posts: 135
Points: 0

Make first row in table taller

So this is ANOTHER thing IE screws up. I'm off to add it to my list of "WHY IE MUST DIE!"

DeprecatedDiva

Polar
Offline
newbie
Last seen: 15 years 7 weeks ago
Timezone: GMT-6
Joined: 2005-06-28
Posts: 3
Points: 0

Make first row in table taller

Thanks for the help.
I'm using an Asp.net datagrid so I can't specify the actual html tags, and I am using IE. Any other ways?