FAQ Database Discussion Community


curved style for image

html,css3,web,styles
How to design the curved style for the image in 3d! The original image has to be show like below image. Because In 3d rotation I need to show it in dynamically like the below image. For editing in Photoshop for each image has take much time so it need...

Scala “Sentence-Like” Function Definition [duplicate]

function,scala,styles
This question already has an answer here: When to use parenthesis in Scala infix notation 4 answers I am refactoring some code and wanted to learn how Scala methods are written so that they can be written like: foo = Map("Hello" -> 1) foo contains "Hello" where "contains" is...

How to change the background color of a TextView inside of an ActionMode

android,android-actionbar,styles,android-actionmode
I have a TextView inside of my action bar, like the following: I have logic configured to make it overlay the Toolbar with an ActionMode when I long-press on an item in the associated ListView. This ends up looking like the following: This is basically correct, except for the annoying...

Remove Combobox winrt flayout heading

combobox,windows-runtime,styles,winrt-xaml
In winrt windows phone app when you have more than 5 items in a combobox, it opens up on a full screen. And on top its written 'Choose an item'. I want to remove this heading from all my combo boxes....

How can I have a TextBox style with properties of other TextBox style

wpf,styles
I made an TextBox style but now i need some differences for example an other corner radius. This is my default style: <Style TargetType="TextBox"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TextBoxBase}"> <Border CornerRadius="10" Padding="2" Background="{DynamicResource DefaultItemBGBrush}" BorderBrush="#C2C2C2" BorderThickness="1" > <ScrollViewer Margin="0" x:Name="PART_ContentHost" FontWeight="Bold" Foreground="#8D8D8D"/> </Border> </ControlTemplate>...

li and a element styling issue with Chrome after clicking a link

html,css,google-chrome,styles,html-lists
I have a simple menu that works fine in Firefox, but when using Chrome the links move around when you click on them and so it breaks the styling. I read from somewhere that display: block; on a element would fix this, but it didn't. You can see a demo...

Attr value is declared in two different libraries

android,design,attributes,styles
I added a library to my project in Android Studio. But as soon as I tried to compile my project I got this error: Attribute barColor has already been declared. After that I checked the whole project and noticed that another library is already declaring that same attribute! How can...

JavaFX css themes

css,user-interface,javafx,styles,themes
Are there any free, ready-to-use css themes to customize the overall look & feel of a JavaFX application, like the default modena.css? It would be nice to gather here a list of available stylesheets....

Jssor slider variable width based on window width

css,slider,styles,width,jssor
It is possible to change slides to fixed width based on window size (media queries)? I don't want it to scale or be in percetange, just fixed width depending on window size. For example something like this @media screen and (min-width: 320px) { .slides { width: 200px; } } @media...

Multiple white space in html

html,styles,whitespace
I would like to ensure that my chords above words are separated nicely by multiple white space. The issue is that when I use pre, it comes out pre-formatted and hence not what I wanted. Also, with &nbsp;, the code looks very ugly. What is the best method to solve...

How to set a borderless button which changes its color when mouse hovering in WPF

c#,wpf,xaml,button,styles
I want to override all my button's style to a borderless grayish button which highlights when hover on. I wrote like below: If I remove the template section (I even have no idea of what does it do), the button will have a border even if I have set BorderThickness...

WPF: why my slider not show the minimum value on my label

wpf,slider,styles
<Grid Margin="405,192,170,450" > <Slider Name="speedSlider" Value="1" Style="{StaticResource SliderStyle}" HorizontalAlignment="Left" VerticalAlignment="Bottom" Minimum="0" Maximum=" 50" TickFrequency="5" TickPlacement="None" Width="160"/> <Label Name="lblSliderSpeed" Content="{Binding ElementName=speedSlider, Path=Value, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" VerticalAlignment="Bottom" HorizontalAlignment="Right" ContentStringFormat="{}{0:#}"/> </Grid> My label show the current slide...

Style expander header background color in App.xaml

c#,.net,wpf,styles,expander
I'm trying to create a global style for Expander in WPF. This is what I achieved so far: <Style TargetType="Expander"> <Setter Property="HeaderTemplate"> <Setter.Value> <DataTemplate> <Border Background="Red"> <ContentControl Content="{Binding}" /> </Border> </DataTemplate> </Setter.Value> </Setter> </Style> And this is how it looks: Not very satisfying. Question: How can I change the background...

PHP String for HTML style

php,html,css,string,styles
I want to show a png file in background of a div. I have this CSS style for put it in the correct place. I'v tested directly in my HTML and the style works properly. I't doesn't work wen I use php variable. <?php if ($RScoluna1['nova'] == 1){ $style =...

while Inherit style in WPF it affect parent style

c#,xaml,styles,wpf-controls
In WPF i have a style for the control like below, <Style TargetType="local:CustomControl"> <Setter Property="Background" Value="Transparent" /> <Setter Property="BorderBrush" Value="Gray" /> <Setter Property="BorderThickness" Value="0,0,0,1" /> <Setter Property="Padding" Value="3,0,3,0" /> <Setter Property="IsTabStop" Value="False" /> <Setter Property="VerticalContentAlignment" Value="Center" /> </Style> Now i need to override customcontrol border for some other place like...

Inserting google map's script into html webpage

javascript,html,css,html5,styles
I was asked to edit webpage for my friend. I am not an IT specialist or computer master, but I can do some edits in html, php and js. I am trying to add the google's map script to this webpage, you can find the code here: http://pastebin.com/UDNZ4F4r. The thing...

How to change colors of Gui-elements belonging to preferences?

android,styles,preferences
I have a PreferenceFragment, which displays several kinds of Preferences. Is it possible to change that blue color of the switch which belongs to a SwitchPreference and the radio buttons, line and title of the dialog which belongs to the ListPreference by assigning own colors to style-attributes ? My base...

Styling Javafx with CSS

java,css,user-interface,javafx,styles
I have been working with javafx lately, and have started to work on styling the form. I have created a program that would create a weak encryption for your text, it isn't totaly done. Here is the java code - public class encryption extends Application { private static StringBuffer password;...

jTextPane color with some exception in chat

java,swing,styles,chat,jtextpane
I am using jTextPane to use sender and receiver chat color. All works fine but [email protected] every chat message. here Jhon is revceiver and peter is sender here peter is revceiver and Jhon is sender may be I m doing some mistake in code. Here is the code for Sender...

Getting currently active menu title in wordpress

php,wordpress,menu,styles
I need to get currently active menu item (menu title like Home, About us, etc..) on each page in wordpress. I am using wordpress codes to display menu & it displayed correctly. Code is shown below, $menu_name = 'primary'; if ( ( $locations = get_nav_menu_locations() ) && isset( $locations[ $menu_name...

Global style isn't being applied

c#,wpf,xaml,styles
I have a resource dictionary file as so: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:TIMS.Common"> <local:ViewModelLocator x:Key="ModelLocator" /> <Style x:Key="DefaultWindowStyle" TargetType="Window"> <Setter Property="Background" Value="Cyan" /> </Style> <Style x:Key="DefaultPageStyle" TargetType="Page"> <Setter Property="Background" Value="Red" />...

“Use Theme.AppCompat theme with this activity” Exception

android,android-actionbar,styles,themes
I used recently Android Asset Studio to generate a custom Action bar theme for an app and when I placed everything in my project the app crashes with this exception: "java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity." Please if somebody has an idea why...

ExtJS: displayfield with same style as textfield

css,extjs,styles
I'm using xtype displayfield for fields which act as link and displayfield renders html ok. It works fine. I would like to use a same style for displayfield as for textfield (especially because of border). Could you tell me the simplest way to achieve it? I've tried fieldCls, baseCls etc....

OpenLayers 3 Stroke style

styles,openlayers-3,stroke
I want to modify style of the method select . I'm able to change the style of this method but i'm not able to duplicate the white border of blue stroke. Someone is able to style vector with a stroke and put a border to the stroke? See this example,...

WPF: Bind to property of a parent element

c#,wpf,xaml,binding,styles
I'm using a DataGrid and would like to introduce a style trigger for cells that sets the background color of the cell depending on the column's IsReadOnly property. I think there is some way to get from the cell level to the column level using RelativeSource (navigating all the way...

Nested Styles in WPF

c#,wpf,styles
I would like to nest Styles in WPF. I have a resource dictionary: <Style x:Key="BottomButtonBar" TargetType="{x:Type Grid}"> <Style TargetType="{x:Type Button}"> <Setter Property="Margin" Value="10,2" /> <Setter Property="Width" Value="90" /> </Style> <Style TargetType="{x:Type TextBlock}"> <Setter Property="HorizontalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="Margin" Value="2,0"/> </Style> </Style> What I want is: If...

How to change ActionBar menu background color (android 4 & 5)

android,menu,android-actionbar,styles,background-color
I've got one trouble while changing android design. I need to change action bar menu background color to black. I know, there are lots of answers for this question. I tried many of them. But nothing worked for me. Oh, and i forgot to say, that i am not a...

Coding Style for User defined Exception in java

java,exception,design-patterns,styles
I'm working on a java project. while browsing the existing code of User defined Exception class, i came across a the code written like below: public final class ApplicationException extends RuntimeException { public static void enforce(final String message) { throw new ApplicationException(message); } private ApplicationException(final String message) { super(message); }...

Android - Overriding a Style per Theme

android,styles,android-theme,android-styles
Is there a way to change a style based on what theme is is set on an activity? for example, suppose my activity has a textview with a style set to TextViewStyle <TextView style="@style/TextViewStyle" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Text"/> This is my TextViewStyle <style name="TextViewStyle" parent="android:style/Widget.TextView"> <item name="android:textStyle">bold</item> <item name="android:textSize">8sp</item> <item...

CSS background elements on both sides of the screen

html,css,background,styles
I want to achieve this: two decoration elements (sort of waves) on both sides of the screen. Here's what I've got so far. If more elegant solution is possible (like styling with CSS only body element), then please advise. Below solution would be fine, if both < img > elements...

jquery: how to determine if a style is set via css class or hardcoded by style attribute? [duplicate]

jquery,css,styles
This question already has an answer here: jQuery check if element has a specific style property defined inline 4 answers For example given two divs like this: .example{ width: 200px; height: 200px; z-index: 4; } <div id="first" style="height:100px;width:200px;z-index:5;">Hardcoded</div> <div id="second" class="example" >Css</div> How can i detect by jquery/javascript if,...

How to style Bootstrap menu like a V? [closed]

css,twitter-bootstrap,menu,styles
Is it possible to style the menu like this (see link http://i.stack.imgur.com/Z5YB6.jpg) in Bootstrap using CSS? How to I do? Thank you in advance!...

The position of int main() function [closed]

c++,function,styles,main,writing
I know that it's possible to write a code in that way: void foo() {...} void bar() {...} string qix(){...} int main() { //functions calling } And also it's possible to write the same like: /* function's prototypes here*/ int main() { //functions calling } void foo() {...} void bar()...

How to make both ListViewItem's template style and ListView.ItemTemplate working?

wpf,xaml,listview,styles
I have the code below in my App.xaml. I override the template to make the background stays the same as transparent when I click/hover on a ListViewItem. <Style TargetType="{x:Type ListViewItem}"> <Setter Property="Background" Value="Transparent" /> <Setter Property="Height" Value="{StaticResource RowHeight}"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ListViewItem}"> <Border BorderBrush="Transparent" BorderThickness="0" Background="{TemplateBinding Background}">...

(AngularJS) Only one less file for entire Website

css,angularjs,styles,less
I am a beginner with AngularJS and I have a little problem, I installed grunt-contrib-less to support less files instead css but now I have to declare all less styles that will be compiled into only one css file. But my problem is normally when I'm using less, I write...

dreamweaver cs6 show where style is used

css,styles,dreamweaver
I'm using Dreamweaver CS6 to maintain a small web site of 23 pages. I'd like to find out if a particular CSS style, like ".anchor" is used at all, and if so, which pages use it. I can't seem to find this out from a web search. Thanks for looking...

WPF - How to highlight a combobox border when focused

wpf,combobox,styles
I trying to create an application combo box theme. However I need the combo box border to change colour when tabbed to. I've tried everything, but I can't seem to get it right. Any help would be appreciated. <SolidColorBrush x:Key="NouvemWhiteBrush">White</SolidColorBrush> <SolidColorBrush x:Key="NouvemSecondaryMainBrush">#FFF58E0F</SolidColorBrush> <Style TargetType="{x:Type ComboBoxItem}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type...

How to position checkbox and text

jquery,html,css,checkbox,styles
I'm having some trouble positioning these checkboxes with its respective text. The actual checkboxes were hidden so that a personal style could be used. Anyway, this is purely a CSS issue. The text should be positioned in front of the checkboxes. I've been banging my head against the wall and...

WPF: apply style only to one tabcontrol containing other tabControl

wpf,xaml,styles,tabcontrol
In my wpf application, I have a tabControl (parent) that contains another tabcontrol (child). I would like to apply a style to the tabItem of the parent tabControl without affecting the child one. I tried with this: <TabControl x:Name="Parent" TabStripPlacement="Left" ItemsSource="{Binding Path=ParentTabItems, Mode=OneWay}" > <TabControl.Resources> <Style TargetType="{x:Type TabItem}"> <Setter Property="Template">...

IPAD Mini - IOS 7.0 - Double Select Box Overlap

css,layout,styles,ipad-mini
I have two select boxes as show on the image above. Now the issue is that when I click on the year field, the month field is still being triggered. Seemed like the area for the first select box is too wide or there is some kind of overlap....

Why font-size is not applied to raw cell content

html,css,styles
I have class definition: .small, td.small, td.small > nobr, td.small > a { font-size: 90%; } That makes text inside of anchor in the cell looking smaller. But style is not applied if I put text in cell without anchor. <table> <tbody> <tr> <td class="small"> <a href="...">Small content</a> </td> <td>Should...

Applying some styles to control

java,android,xml,styles
As you know in html/css you may apply some classes (and hence some styles) to the tag. It is cery convenient and i would like to have tgis opportunity in android development. Is there a way to apply some styles to one control?

DataGridView freezes when loading content and style C#

c#,winforms,datagridview,styles,freeze
My form has 6 dataGridViews in different tabs of a tab Control, the user is able to enter values and change the cell backcolor, with a save button, the values for each dataGridView are saved into a text file, same with the backcolor of the cells in each dataGridView. When...

Combining style attributes this way

html,css,styles
<!DOCTYPE html> <html> <body> <h1 >This is a heading</h1> <p style="color:blue" "font-size:300%">This is a paragraph.</p> </body> </html> Is it possible to combine two style attributes this way? How does one do that?...

How to remove button border style?

button,styles,autohotkey
In autohotkey, how do you remove the black button border? I just want a button without any border on it. I've tried all these style modifiers to no avail. gui, add, button, hwndMyButton Control, Style, -0x0,, ahk_id %MyButton% ;remove BS_PUSHBUTTON Control, Style, -0x1,, ahk_id %MyButton% ;remove BS_DEFPUSHBUTTON Control, Style, +0x8000,,ahk_id...

Style div display table-row can be styled or not

html,css,html5,css3,styles
I have a CSS table using divs only, I need to set style to the div ROW like this: <div style="display:table;width:100%;height:80px"> <div style="display:table-row;width:100%;height:80px; background:#333"> <div style="display:table-cell;width:200px;height:auto"> 1 </div> <div style="display:table-cell;width:auto; height:auto"> 2 </div> <div style="display:table-cell;width:200px;height:auto"> 3 </div> </div> more rows and tds in CSS </div> Questions: 1.- because div display...

Indenting text on html select tag

css,css3,cross-browser,styles
I have a select tag which I am trying to give some style. <select class="points-selection" ng-options="line as line.pick for line in slip.lines"> </select> then I have this .points-selection { background-color: get-color(nieve); border: 0; border-radius: get-space(xxx-small); color: get-color(night); cursor: pointer; margin-top: get-space(xxx-small) + 1.5; padding: get-space(xxx-small); text-indent: 32.5%; width: 100%; }...

Any idea with font-size of 1.05em/1.2em?

css,styles,font-size
I saw a vid on Youtube and noticed that the font-size of body is 1.05em/1.2em. http://i.stack.imgur.com/KvWbY.png However, I tried this setting like 1.4em/1em vs. 1.4em. It seems to be a little bigger for 1.4em/1em, but there's no difference between 1.4em/1.4em or things like this. Any idea with this kind of...

How to set minimum height of row in prawn Table cell

ruby-on-rails,ruby,styles,prawn
I can set height for row. But it is fixed height. if content increases height does not increase automatically. just clip extra content. Here is my code. how can i set default height 20 not fixed height pdf.table([applicant_data], :cell_style => { :inline_format => true, :padding => [3, 3,3,3], :size =>...

No Parenthesis in Rails - Good Style? [closed]

ruby-on-rails,ruby,styles
When I first started with ruby/rails and noticed that you don't need to put parenthesis, I recall thinking "no way I'll do that!". But now I kind of like it. So the question is, is that good style? Or should I stick to using parenthesis? Thanks....

Is it possible to add a class and a style to a Razor element

css,razor,model-view-controller,styles
Is it possbile to add a style AND a class atrribute to a Razor element. <div style="width:170px;float:left;"> @Html.DropDownListFor(m => m.SelectedPremise, Model.PremiseList, "Please select", new { @class = "selectpicker", data_style="btn-primary" ,style="width:100px;"}) </div> This does not work......

Cycle through array with animation

jquery,html,css,animation,styles
So I want to cycle through a list of arrays when I click the button, I've found info but can't figure out how and where to put it into the code I have already, check the below to see what I have already; My Current Code [1]: http://codepen.io/anon/pen/PqKYwz If anyone...

How to change window style/theme in c++

c++,user-interface,styles,window,themes
I need an approach how to customize the window style like Steam or Spotify. I don't want to have the boring Windows (or any other OS) look. Can that be done with Qt or the WinApi? Do I need DirectX or OpenGL for doing that? Best Regards...

TimePicker not displaying on android 4.4.2 - screenshots attached

android,dialog,styles,android-4.4-kitkat,timepicker
I have 2 phones, a Nexus 4 with Android 5.0.1, and an LG f60 with Android 4.4.2 on it. I have a custom dialog with this layout: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/linearLayout1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center" android:orientation="vertical" > <DatePicker android:id="@+id/datePicker1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:calendarViewShown="false" >...

No resource found that matches the given name [email protected]:style/Widget.AppCompat.Light.ActionBar.Solid.Inverse'

android,xml,styles,android-manifest
Sorry for my english. I try change action bar collor. And i have this error: error: Error retrieving parent for item: No resource found that matches the given name [email protected]:style/ Widget.AppCompat.Light.ActionBar.Solid.Inverse'. I have minSdkVersion = 12 style.xml <resources xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android"> <style name="MyTheme" parent="@android:style/Theme.Holo.Light"> <item name="android:actionBarStyle">@style/MyActionBar</item>...

Align text in Excel cell with new line c#

c#,excel,styles,interop,excel-interop
How can I align the text in Excel when a cell has 2 lines? I tried this: for (int j = 1; j <= RowsCount; j++) { for (int i = 1; i <= 18; i++) { ws.Cells[j, i].Style.VerticalAlignment = Microsoft.Office.Interop.Excel.XlHAlign.xlHAlignCenter; ws.Cells[j, i].Style.HorizontalAlignment = Microsoft.Office.Interop.Excel.XlHAlign.xlHAlignCenter; } } But this works...

How use layer-list to create custom background

android,xml,styles
I'm trying to play the background image below using layer-list, but without much success -> http://i.stack.imgur.com/5XBFL.png I used this example <?xml version="1.0" encoding="utf-8"?> <item android:top="1dp" android:left="1dp" android:bottom="5dp" android:right="5dp"> <shape android:shape="rectangle"> <size android:width="20dp" android:height="3dp"/> <solid android:color="#f00"/> </shape> </item> <item android:top="4dp" android:left="1dp" android:bottom="5dp" android:right="5dp">...

Unexpected behavior of AlternativeRow BackColor in WPF

c#,wpf,datagrid,styles
I'm styling my DataGrid using an style provided by Microsoft at this page. I'm not changing this style except a single line as following that enables alternative row back color. <!--Style and template for the DataGrid.--> <Style TargetType="{x:Type DataGrid}"> <Setter Property="AlternationCount" Value="2"/> ... and the rest of the style I...

HTML/CSS: Link Styling being used for image hyperlinks, and I can't get it to stop?

html,css,hyperlink,styles
I am adding links to images and I can not remove the a:link style and a:hover style that is designated for my text links. I added in a new .css style for a.button:link and a.button:hover, #content a.button:link { text-decoration:none; } #content a.button:hover { text-decoration:none; } and set the <a href="www.website.com"...

WPF style info from external text file

wpf,vb.net,styles
Not sure if this is possible, but I have a WPF application that now has a requirement to be skinnable. Basically, this equates to several key colours and a couple of logos. Is there any way of grabbing the hex values for the colours in defined styles from an external...

Constructing book cover using div and CSS

html,css,styles
Is it possible to use some divs and css to make a book cover like the one below(ignore the orange background) with editable titles, most the book covers I checked online don't look like this. I know am probably asking a lot but I would really appreciate any help on...

How do I convert font style to font weight in Java?

java,fonts,javafx,styles,weight
I want to set a specific ont to a Text within a TextFlow in JavaFx. However, Font has only static .font() methods, which expects a FontWeight instance. How do I convert a font style like "Regular" to a FontWeight instance? There is no "Regular" in the final fields of Font....

Q: I need idea to display a string with css, jquery or any other techniques (no php)

php,jquery,css,design,styles
I have a big problem. I have a mysql database which contains 12 character length fields. I would like to display somehow. Sample data from the field: 233215334523 I would like to display 0 and 1 with red background 2 3 with yellow background and 4 5 with green background....