*
The moose likes HTML, CSS and JavaScript and the fly likes JSP and inline Style Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "JSP and inline Style" Watch "JSP and inline Style" New topic
Author

JSP and inline Style

Joe Brigs
Ranch Hand

Joined: Jun 06, 2011
Posts: 60

I have a JSP that I'm displaying two Database Records. On the left side I'm displaying the Current Record thats coming from a Master Table on the right Side I have the related Record coming from a Pending Record ( an Update ). Theres about 30 columns side by side so the user can compare whats changed before approving the Update. Not all fields will change. The fields that changed I will highlight in a bright color. I know you should use CSS for styling but in this case I'm drawing a blank on how to get this done in CSS even if its possible. I have code below that works , but can I use CSS to do this or am I correct in the way I'm doing it. ( Not sure if I should post this somewhere else but its a JSP page) Thanks for help

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60781
    
  65

A better way to do this would be to assign class names to the elements and use a stylesheet to assign specific renditions such a colors.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Joe Brigs
Ranch Hand

Joined: Jun 06, 2011
Posts: 60

Bear , I stared at your reply, then got side tracked. Want back to your reply and solution is so simple, it hit me like a brick in my thick skull. Thanks for help.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60781
    
  65

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JSP and inline Style
 
Similar Threads
jsp: include not working...
Comparing values using JSTL
Usings custom tags within your tag handler class
how to avoid show buttons
Populating DropDown Boxes