Is it possible to change the header style of a rich:simpleTogglePanel ?? The font of the header is always "bold" and I want it to be normal.
I tried with the style attribute this way: style="font-weight:normal" without result.
Any idea?
Have you tried putting the !important at the end of your style definition(i.e. style="font-weight:normal !important;")?
Also, as I'm sure you are aware, it is usually better to specify your style in a separate stylesheet. I've customized the <rich:extendedDataTable in this manner (not sure if this is a hack or not, but it works great for me). Open your page in a browser and then crack open the developer tools (press F12 in Firefox with FireBug installed, or in Chrome right click on the rich:SimpleTogglePanel and click 'Inspect Element'. This will let you see the CSS definition name used by the RichFaces framework. Just create a new .css file and define the style you want using the name you find RichFaces is using.
/*This class defines styles for a table cell.*/
/*tableBorderWidth, tableBorderColor border-bottom*/
/*tableBorderWidth, tableBorderColor border-right*/
.rf-edt-c {
border-bottom: 1px solid #021e2f;
border-right: 1px solid #021e2f;
height: auto !important;
min-height: 26px;
}
As you can see, you may need to specify the !important tag there as well, but it keeps the style outside of your page...
Hope this helps.
Related
How I can add borders around specifically selected text in a text view like this?
I have recelerview in the activity and the data showing in picture is get from server using API, the API send data wrap with HTML tags like
"<div style=“border:2px solid red;padding: 5px;border-radius: 25px;”>the ground.</div>"
But the border tag is not supported by either Android nor iOS. I need to find a way to show border on both iOS and Android. If I need to communicate with a web team for a change I can do this, but any help will be appreciated.
Note: we cannot use Webview, because we need to perform some other operation on each text row.
Check the following line of code. I think this piece of code helpful for you:
<div style="border:3px; border-style:solid; border-color:#000000; padding: 1em;">the ground.</div>
If you want get border in your text, set your html like this
<div style="border:2px; border-style:solid; border-color: red; padding: 1em ; display: inline-block; border-radius: 25px;">the ground.</div>
But, i don't think that TextView can show css, in my experience i've using web view to do that.. Furthermore, my suggest if you don't want to use webview just set bold to specific word
I have developed my site using a theme (HTML, CSS, JavaScript).
But the Blog Title is using default link color.
I have tried many ways to use the Title color, but I became unsuccessful to do that.
How can I change the Title color?
Title color is disabled
Title is using Default link color
You can override the css properties using !important.
So, the following change might help:
.header-logo h1 {
color: #065445 !important;
font-size: 30px;
line-height: 1.4em;
}
Apply color property to "a" tag, not on h1. You can either use the following ways:
inline-CSS to impose this color to the title.
Use !important with color property of CSS.
.header-logo h1 a{
color: #065445 !important;
}
I have lots of tool-tips in my SmartGWT application and now I want to change the width of each tool-tip without setting width of each individual tool-tip that is most tedious task.
I can set the width of tool-tip in SmartGWT using Canvas#setHoverWidth() but my concern is to apply this setting globally applicable for whole application.
Is there any way in SmartGWT to specify the tool-tip width globally applicable for whole application using CSS or JAVA code?
For sample code have a look at Hovers Tooltips Sample (Smart GWT).
Thanks in advance.
Finally I got the style name that is applied on all the tool-tips.
SmartGWT have a concept of Skinning that is the process of modifying Smart GWT's default look and feel to match the desired look and feel for your application.
A "skin" consists of:
a single CSS stylesheet containing all CSS styles used by Smart GWT components (skin_styles.css)
a single JavaScript file that sets component defaults (load_skin.js)
a directory tree of images organized by component
I found the style canvasHover in skin_styles.css that is used for hovering on Canvas.
I just added min-width: 135px; that changed the width of all the tool-tips globally in the application. By default it's 100px.
/* hover canvas */
.canvasHover,.gridHover,.formHover {
background-color: #fdfdd3;
border: 1px solid gray;
color: black;
font-family: Arial, Verdana, sans-serif;
font-size: 11px;
padding: 5px;
min-width: 135px;
}
Thanks a lot for your attention.
I have no idea about SmartGWT works, but for this kind of dirty things if those elements are attached to the DOM, I'd use GQuery.
Something like:
GQuery.$("#yourTooltipId or .yourTooltipClass", RootPanel.get()).each(new Function() { public void f(Element e){
GQuery.$(e).width(30);
}});
Instead of RootPanel.get(), you can use other scope if for any reason you have all the tool-tips under the same view.
On my JSF website, I've got a couple elements that I'd like to use to cause navigation to our old classic ASP site (no data needs survive, just simple navigation). What's the best way to do this?
Thoughts so far:
- Using the outcome/navigation rules implies that you're staying within the same site. Can it be used to navigate outside?
You can't use navigation cases for this. Use h:outputLink with a direct URL.
<h:outputLink value="http://google.com">Click</h:outputLink>
Or just plain vanilla HTML.
Click
Update:
A <h:commandButton> is also doable, but then you have to add a bean action method which does ExternalContext#redirect() to the desired URL.
public void submit() {
FacesContext.getCurrentInstance().getExternalContext().redirect("http://google.com");
}
An alternative is indeed to style the link to make it look like a button. Here's a kickoff example:
a.button {
display: inline-block;
background: lightgray;
border: 2px outset lightgray;
cursor: default;
}
a.button:active {
border-style: inset;
}
Use it as <h:outputLink styleClass="button"> or <a class="button">.
I all, I'm new to the ADF language and after a long search and failed tries, I have to ask how can I change a button layout - background, border, ... - using the CSS and the property "styleClass" of the ADF?
In my .jspx I have something like:
<af:commandButton action="#{backing_test.echoAction}" id="echo1" text="Save 1" styleClass="commandButton.buttonSaveTest" />
The thing is, after opening firebug, I found out that instead of a regular button, I have an image!
Thanks for you help!
You can't rely on what generated HTML you'll get for a specific component in ADF. The best way to get your own look and feel is to implement your own 'skin', which extends one of those already provided by ADF (eg, 'blafplus', or 'fusion', the new default). You then use the CSS selectors for the component you want, eg
af|inputText::content {
background-color: red;
}
Check out the following link to learn about skinning
http://download.oracle.com/docs/cd/E17904_01/web.1111/b31973/af_skin.htm#BAJFEFCJ
The hosted demo is an excellent way of finding out how to skin specific components. Eg, for your command button, check out:
http://jdevadf.oracle.com/adf-richclient-demo/faces/components/skinningKeys/commandButton.jspx