• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

striped table in JSP

 
Eduardo Ponce de Leon
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am displaying code from a DB. What I want to do is to give it some format to my table. By format i mean html color so that each odd rows have a gray background and even rows have a white background, like a striped table. how can i create that dinamic table?

This is what i have for my code...like i said i can display my table with no problem.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just like any other HTML page, with CSS.
 
Paul Clapham
Sheriff
Posts: 20989
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's how I do it in EL; the 'grey' and 'white' constants refer to entries in the page's CSS.

 
Eduardo Ponce de Leon
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
never used CSS... where do does tags go in my code? Sorry, I am a beginner
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As JSP creates HTML pages, you need to bring yourself put to date with HTML, CSS and JavaScript.
 
Eduardo Ponce de Leon
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Really, I´ve been reading and cannot figure it out... I am sure it is not that hard but can somebody teach me how to do it?
 
Paul Clapham
Sheriff
Posts: 20989
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My google keywords were "css tutorial" (it's been a while since I learned how to do this). Here's a representative link: starting with HTML + CSS.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are a novice to JSP, I highly recommend this article.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic