styling

How can I make use of customized icons in PrimeFaces?

不问归期 提交于 2019-12-19 09:56:16
问题 PrimeFaces provides a lot of icons from jQuery themeroller. They're useful but I need to have some customized icons for my app. Suppose I have a <p:commandButton> : <p:commandButton icon="ui-icon ui-icon-check" /> Since my CSS knowledge is very limited, I'd be very grateful if you could show me how I can put some customized icon into the label of the above button. Best regards, 回答1: You need to define your own css class: .img-button-help { background-image: url('../images/help.png')

Chrome search feature (ctrl+f) finds hidden text ( but it's invisible! )

妖精的绣舞 提交于 2019-12-19 05:21:06
问题 Look at this fiddle. Enter Ctrl + F and search "gets" ... For me Chrome finds invisible text from this text: A long option that gets cut off It's reproduced on Linux/Ubuntu 12.04 Chrome Version 31.0.1650.63 HTML <!--works for a div--> <div> A long option that gets cut off </div> <!--but not for a select--> <select> <option>One - A long option that gets cut off</option> <option>Two - A long option that gets cut off</option> </select> CSS select { width:100px; overflow:hidden; white-space

WPF share column width between separate grids

旧城冷巷雨未停 提交于 2019-12-18 18:36:16
问题 I have the following setup on my WPF UserControl: <GroupBox> <Grid> ... <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <GroupBox> <Grid> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="..." /> I'd like the second ColumnDefinition to be the same width as the first ColumnDefinition, but I don't want to set an explicit width. Instead, I want both grids columns to automatically stretch to the width of the longest piece of content in either grid column! Is this possible

How to apply multiple css radial gradients to a single element

一个人想着一个人 提交于 2019-12-18 17:31:14
问题 I have the following style applied to my div element: background-image: -moz-radial-gradient(50% -10%, ellipse closest-corner, rgba(5, 5, 5, 0.7), rgba(0, 0, 0, 0) 100%); This has the desired effect (being an inner drop shadow only at the top of the div ). I would like to apply the same effect at the bottom of the div . The following line does it well, but it seems to override the first, so I can only get one or the other. background-image: -moz-radial-gradient(50% 110%, ellipse closest

bokeh DataTable with conditionally coloured cells

橙三吉。 提交于 2019-12-18 12:09:08
问题 I want to display a DataTable in bokeh, wich cells are either red or orange, according to the text content of the cell. For example, if the cell contains the word "error", then the cell is displayed in red background. If the cells contains the word "warning", then it's orange. I believe I should use [HTMLTemplateFormatter][1] , but how? How would I do that? Thanks 回答1: Looking through the documentation, you can use a HTMLTemplateFormatter and underscore js to format the table. See http://docs

Styling a Google Maps v3 Polyline with Dashes or Dots?

对着背影说爱祢 提交于 2019-12-17 22:24:13
问题 I'd like to take a Google Map v3-based map with some custom polylines, and make some of those lines dotted or dashed. I can't seem to find any way of doing this. Is it possible, and if so, how? 回答1: This feature has been added to Polyline options, and it's called Symbols on Polylines Creating a dashed line looks like this (demo): var lineCoordinates = [ new google.maps.LatLng(22.291, 153.027), new google.maps.LatLng(18.291, 153.027) ]; var lineSymbol = { path: 'M 0,-1 0,1', strokeOpacity: 1,

Android 4.0 Sub-Title (section) Label Styling [closed]

十年热恋 提交于 2019-12-17 22:03:23
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . So I was looking at the Android Dev Design site for ICS and all of the apps have these subtitles/section headers: I was wondering if anyone knew the custom styling to achieve labels that look like this. I couldn't find any label Views that looked like this in the Android SDK but I

Android multi color in one TextView [duplicate]

心已入冬 提交于 2019-12-17 17:36:48
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Is it possible to have multiple styles inside a TextView? I want my TextView to show some part of its text in red and others in black. It's content (the text) is created dynamically and i don't know how many words will be red colored. Is there any way to do this like in html-css? 回答1: You can use Spannable to achieve what you want. String text = "This is <font color='red'>red</font>. This is <font color='blue'

Set a padding on dataGridCells in WPF

大城市里の小女人 提交于 2019-12-17 15:32:11
问题 simple question: How can I set a padding on a dataGridCell in WPF? (either one at a time or on all cells, I don't care) I have tried using the DataGrid.CellStyle property by adding a setter on the DataGridCell.Padding property as well as using the DataGridColumn.CellStyle property in the same way with no effect. I also tried using the DataGridColumn.ElementStyle property with no more luck. I'm kind of stuck there, has anyone managed to get a padding applied on a dataGridCell? NB: I'll add

How to change the style of a Select box' optgroup label

对着背影说爱祢 提交于 2019-12-17 07:40:02
问题 I have a simple select box with an optiongroup in my application. <select> <optgroup label="Swedish Cars"> <option value="volvo">Volvo</option> <option value="saab">Saab</option> </optgroup> ---- ---- ---- </select> When it gets displayed in browser, the option group label is displayed with bold and italic; I want it to be displayed without any of those styles. 回答1: Unfortunately select boxes are one of the few things that you can add very little style to with CSS. You are usually limited to