| Author |
JSP with Stylesheet
|
frank braunstein
Ranch Hand
Joined: Dec 17, 2009
Posts: 60
|
|
Hello,
i got a very simple web-app and wanted to implement a stylesheet for my view (jsp-document).
My JSP looks like this:
line 6 code above shows the html-tag which "connects" to the stylesheet. and yes the stylesheet is named "style.css" and is in the same folder as the jsp-document.
and the extremly simple stylesheet looks like this:
unfortunatly the border specified does not appear on the screen. Any hints ?
Thanks in forward...
UPDATE:
I found a solution, which seems too inelegant, but works:
that means adding the "meta-tag" and "html:base-tag" do contribute something i do not comprehend at this time.
Still i am open for other solutions...
regards
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26200
|
|
|
#wrapperTable is a comment in CSS. You want to use .wrapperTable
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26200
|
|
|
Moving to our HTML forum which covers CSS.
|
 |
frank braunstein
Ranch Hand
Joined: Dec 17, 2009
Posts: 60
|
|
Jeanne Boyarsky wrote:#wrapperTable is a comment in CSS. You want to use .wrapperTable
No definitly not, since:
1. After the UPDATE (see edited post), the stylesheet is working.
2. in stylesheets using # correlates to the "div-id" specifier.
Still im open to other solutions...
regards...
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
Um
That is saying you are using a print style sheet...aka printer, not the browser
Eric
|
 |
frank braunstein
Ranch Hand
Joined: Dec 17, 2009
Posts: 60
|
|
Eric Pascarello wrote:Um
That is saying you are using a print style sheet...aka printer, not the browser
Eric
In the UPDATE i excluded the media-specifier, thats fixed.
But innitially i had also the same Tag as you written in your post, it didnt work. When i tried to fix it before posting.
@Jeanne Boyarsky (Special Internet Officer)
#-sign is not a comment!
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
I was telling you what that tag meant, not what you are supposed to use.
Learn about media
Eric
|
 |
frank braunstein
Ranch Hand
Joined: Dec 17, 2009
Posts: 60
|
|
Eric Pascarello wrote:I was telling you what that tag meant, not what you are supposed to use.
Learn about media
Eric
thanks, i will take a look at that.
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26200
|
|
frank braunstein wrote:#-sign is not a comment!
You're right. I should have thought that through before posting. The ironic thing is that I'm working on css right now! I think that's why I posted it wrong.
To clarify what I was thinking. There is a CSS hack that uses the "#" for IE 6. Of course the most common instance as a selector uses a # normally.
Can I claim ignorance due to snow day?
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56219
|
|
|
You might also want to reconsider the use of page-relative URLs in JSP pages. They might work in some case, but not all. You are much better off sticking to server-relative URLs as outlined in the JSP FAQ.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
frank braunstein
Ranch Hand
Joined: Dec 17, 2009
Posts: 60
|
|
Jeanne Boyarsky wrote:
frank braunstein wrote:#-sign is not a comment!
You're right. I should have thought that through before posting. The ironic thing is that I'm working on css right now! I think that's why I posted it wrong.
To clarify what I was thinking. There is a CSS hack that uses the "#" for IE 6. Of course the most common instance as a selector uses a # normally.
Can I claim ignorance due to snow day?
What a coincidence! Outside my room it is also snowing. but claim accepted!
regards...
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
# is not used for css hacks in IE
Main IE CSS hacks are:
*
_
\9
Eric
|
 |
 |
|
|
subject: JSP with Stylesheet
|
|
|