• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

CSS query

 
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Guys,

I have got a query.

1. I created CSS with following content :
-----------------------------------------
.tableClass {
font-size: 10em;
}

.tableClass TBODY {height =30px;overflow =scroll;
font-size: 1em;
}
-----------------------------------------

2. Next, I created an HTML with following content

<table class="tableClass">
<thead>
<tr><th scope="colgroup" colspan="2">(header table)</th></tr>
</thead>
<tbody id="sourceSummaryForm:_idJsp11:tbody_element">
<tr><td>Source 1</td><td>Type 1</td></tr>
<tr><td>Source 3</td><td>Type 3</td></tr>
</tbody>
</table>

In above HTML, I specified the style class for <Table> and assumed the style for tbody would be picked as specified in CSS but seems it didn't work. Am I trying to achieve something impossible?

P.S. My main problem is I got JSF Datatble, and I want a fix header and scrolling body. JSF Datatable has styleClass attribute and don't allow me to specify one for tbody. I know few workaround, but just trying to see if CSS can solve problem.
[ December 19, 2006: Message edited by: Varun Khanna ]
 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did I ask something pretty stupid?
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you should look at the top result of http://www.google.com/search?q=css+scrollable+table

Eric
 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please search in google for scrolling tables and you will get the script..
 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.
I was stucked over how to iterate till child element using stylesheet and link did explain me.

Thanks again.
reply
    Bookmark Topic Watch Topic
  • New Topic