This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes style sheet question 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 » Engineering » HTML, CSS and JavaScript
Bookmark "style sheet question" Watch "style sheet question" New topic
Author

style sheet question

cormac patterson
Greenhorn

Joined: Nov 02, 2001
Posts: 4
When setting up the various text styles in a style sheet, I use the *p class="name"* for the different regular text styles I want to use. The problem is that the paragraph tag automatically inserts a blank line. So if I want to put a short descriptive sentence on the next line immediately below a link, for example, there is a blank line inserted and then the sentence begins on the following line.
Does anyone have any suggestions for a different method than that will eliminate this extra blank line -- such as using the line break tag in regular html.
thanks
Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2578

Just include display:inline; in the style tag of your class or <p> tag, that'll get rid of the extra blank line. Alternatively use <span> tag or something similar.

HTH,
- Manish
cormac patterson
Greenhorn

Joined: Nov 02, 2001
Posts: 4
THANK YOU!!!
I could not find an answer to that anywhere.
take care,
cormac

Originally posted by Manish Hatwalne:
[B]Just include display:inline; in the style tag of your class or <p> tag, that'll get rid of the extra blank line. Alternatively use <span> tag or something similar.

HTH,
- Manish [/B]

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: style sheet question
 
Similar Threads
set font for textarea
Printing problem....help
What are the available binding styles for webservice
Netscape and Overflow Property
how to add HR tag between rows when using datatable???