File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes How to get blank underlined line in jsf? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "How to get blank underlined line in jsf?" Watch "How to get blank underlined line in jsf?" New topic

How to get blank underlined line in jsf?

Happy S Singh
Ranch Hand

Joined: Nov 14, 2011
Posts: 52
I have tried this but got only blank spane without underline

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15952

Your problem is not JSF, it is the HTML that JSF generates.

HTML is unlike PostScript (PDF) format in that the layout information is only a suggestion rather than absolute, and one of the ways you can see this is in what it does with space characters on the page.

There are a couple of ways to get a horizontal line on a web page in HTML (and thus in JSF). The most basic one is the <hr/> tag. By default, however, this won't be an underline, it will be a line approximately midway up in the current row.

Another way is to use an image tag to pull in an image of a blank underline and stretch it horizontally using the image width attributes.

Or you can define a single-column table (panelGrid) of the required width and height with a bottom border and nothing in the table. This also works with a straight HTML <div> element.

If you are looking, however, to construct an input form with underlined data entry areas similar to a printed form, you can do a CSS override on the HTML input control to change the box from its default all-around border to one with only a bottom border.

Customer surveys are for companies who didn't pay proper attention to begin with.
Avik Mazunder
Ranch Hand

Joined: Jun 27, 2012
Posts: 39

In style tag include
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: How to get blank underlined line in jsf?
Similar Threads
Displaying blank spaces between two words
Number Addition
about the exam format
set a data source in domain mode in JBoss AS7
Compiling blank lines patterns using regex