FAQ Database Discussion Community


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...

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...

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....

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...

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?...

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>...

Edit Style Attribute of every div in a list

javascript,html,css,styles
I'm trying to write a script to help out a colourblind friend of mine. He's on a page laid out like this: <div class="message-pane-wrapper candy-has-subject"> <ul class="message-pane"> <li><div style="color:#700400"></div></li> <!-- many more li items --> </ul> </div> What I'm trying to do is use JavaScript to change all of the...

JS: Cannot read property 'style' of null

javascript,styles
(Sorry for my aplogize, I got some mistake, just updated the new code again.) I have the following code,and Chome throws"Uncaught TypeError: Cannot read property 'style' of null" to the console: function gen_mainTable(){ var code = ""; code +='<table width="100%" border="1" cellspacing="0" cellpadding="4" align="center" class="FormTable_table" id="mainTable_table">'; code +='<tr><td class="CL">SELECT</td><br><td colspan="2"...

How to set width and height in jQuery

javascript,jquery,styles,height,width
I have a background image and I am trying to optimize the site by specifying height and width for all images. I cannot figure out how to set width to 450 and height to 350. <!-- BACKGROUND IMAGE --> <script src="js/supersized.3.2.1.min.js"></script> <script type="text/javascript"> jQuery(function($){ $.supersized({slides:[{image:"/images/heritage/background.jpg"}]});}); </script> ...

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">...

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...

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...

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...

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...

Style “Cannot find resource 'MetroCheckBox'” in MahApps

c#,wpf,xaml,styles,mahapps.metro
I'm starting to use styles in WPF. I'm using MahApps styles as a base, which so far has been really good. I've been able to make specific modifications using the BasedOn property. One of the simpler changes is to add a default margin so when adding controls they don't touch....

Android custom button style not working

android,styles
I have this style on my styles.xml: <style name="btnStyleGenoa" parent="@android:style/Widget.Button"> <item name="android:textSize">15sp</item> <item name="android:textStyle">bold</item> <item name="android:textColor">#FFFFFF</item> <item name="android:gravity">center</item> <item name="android:shadowColor">#000000</item> <item name="android:shadowDx">1</item> <item name="android:shadowDy">1</item> <item...

Style only one anchor link with class applied to li

css,styles,stylesheet
Struggling with this one but I'm sure it's quite easy! WordPress is applying a class "current_page_item" to the <li> that surrounds my anchor link in my side menu. I want to bold the current page item only. I have some sub menus being nested like so: <ul class="menu"> <li class="current_page_item">...

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......

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...

styles css in embeded souncloud player

css,iframe,styles,embed,soundcloud
I am trying to make a small site I use embed code to display soundcloud music in webpage. however, I want to remove the orange button play and the player down my iframe . I am researching I found that I could do it with css, just hidden buttons ....

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...

HTML email coding

html,email,styles
I am altering an html email template created by previous designer. It doesn't look right to me: <html style="margin: 0;padding: 0;border: 0;width: 100%;height: 100%;"> <head> </head> <style type="text/css"> I would have thought 'style' goes into 'head' and 'html style="..." looks confusing. I am not an expert on html emails, just...

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 =>...

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...

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...

“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...

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...

Change icon on ActionBar tab click or swipe - Android

android,android-layout,android-actionbar,styles,android-tabs
It took me a long time just to get my ActionBar tab icons in the split ActionBar, as well as get the tab indicator color to white. So now all I need to do is to swap the icon with a different color, when it is unselected. The selected icon...

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" />...

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...

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...

WPF add new Slider style cause XamlParseException

wpf,slider,styles
i found this slider style that i want to add. i added all the 3 styles inside my Window.Resources and also put in the first style the 2 templates: <Style TargetType="{x:Type Slider}"> <Setter Property="FocusVisualStyle" Value="{StaticResource MyFocusVisualStyte}" /> <Setter Property="SnapsToDevicePixels" Value="true" /> <Setter Property="OverridesDefaultStyle" Value="true" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type...

WPF custom button

wpf,button,styles
I start to learn WPF and there is something that is still unclear for me: i created new Style for button: <!-- no border button style --> <Style x:Key="NoBorderButton" TargetType="Button"> <Setter Property="Foreground" Value="White" /> <Setter Property="Background" Value="Transparent" /> <Setter Property="BorderBrush" Value="Transparent" /> <Setter Property="BorderThickness" Value="0" /> <Style.Triggers> <Trigger Property="Control.IsMouseOver" Value="true">...

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"...

How to style object when the user clicks it

html,css,styles
In css for the links I can style the as before user clicks and after user clicks. But how can I do this for simple text or an object that when a user clicks that object then change its color. For Example <style> .object:onmouseclick { background-color:green; padding:5px; } </style> What...

Android - Send email with styled HTML

android,html,colors,styles
I get a server response which provides us with HTML to be sent via gmail. This works fine on the iOS counterpart of the app, however the text just comes out as plain text in the Android application. Here is an example part of the response we get: <html> <p...

Android app theme textViewStyle doesn't work on phone

android,xml,textview,styles,android-theme
I have so specific problem. I'm applying theme for all textviews. It appears on preview but when I run this app on phone I face with unstyled textview. The styles I set for other views are working. only textviewstyle is not working. In this sample textview color is green in...

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 change the property of gridslide

jquery,grid,styles,photo,jssor
I changed the property in .js end style but I not have success I need help. The grid is this http://www.jssor.com/demos/grid-slider.html I need it to full screen....

Choose Style depending on property

c#,wpf,styles,datatrigger
Is it possible to set the Style Property (of a Button for example) from within a DataTrigger on the same control? I would like to define my Default-, MouseOver- and Selected-Styles as resources to reuse them later on. However handling MouseOver (and other) events seems to be usually done by...

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...

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}">...

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,...

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!...

(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...

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....

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....

How would you bind a DataTrigger to a Child property from a resource-defined Style?

wpf,binding,styles,datatrigger
How can I style an element based on changes in child properties? I would accept a different approach, but the desired result is simply that the parent property is set a certain way as long as a a child property (IsPressed) is true. If we are styling one named item...

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 =...

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 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...

How to add css class to style.css?

jquery,css,styles
I have this code by helping of skobaljic which add title to class in div $(document).on('ready', function() { $("[title*='animotion']").addClass(function(){ $(this).parent().css('overflow','visible'); return $(this).attr('title'); }).removeAttr('title'); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <p><img src="http://placehold.it/350x150" title="animotion newClass new1" /></p> How to add these new classes to style.css with jQuery?...