FAQ Database Discussion Community


Changing styles in Word using vba

styles,word-vba
I am very new to programming, so forgive my ignorance. I am trying to create specific headings in a document that does not have any or has different heading styles assigned. What precedes the text in the headings are numbers. The numbers are specific and essentially represent the content of...

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

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

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

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

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

WPF style button

c#,wpf,xaml,styles
I've tried to change style for mouseover event. Here's my styles code: <Window.Resources> <Style x:Key="NavigationButton" TargetType="{x:Type Button}"> <Setter Property="Background" Value="#295fa6"/> <Setter Property="BorderBrush" Value="{x:Null}"/> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Background" Value="Red"/> <Setter Property="BorderBrush" Value="{x:Null}"/> </Trigger> </Style.Triggers> </Style> </Window.Resources>...

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

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

Base.Widget.AppCompat.Button vs Widget.AppCompat.Button

android,styles,appcompat
I´m Using AppCompat 22.1.1 What´s the difference between Base.Widget.AppCompat.Buttonand Widget.AppCompat.Button ?...

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

Is there something like style group?

android,styles,themes
I have two group of views which should use different styles, just call them leftStyles and rightStyles. the two group of views have the same layout.xml , I want to programly change the "styleGroup" of the container to change all it's children's style, just like a theme. Did it exist...

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

how to remove blank space from web page? [duplicate]

html,css,css3,styles
This question already has an answer here: HTML: white space around elements, how to remove? 2 answers I Have one Problem by web page design.can't remove this space from page! by this style: <body> <div style="width:100%;" > ss </div> please see this picture of my page: ...

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

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

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

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

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

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

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

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

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

Define common styles in android drawables

android,styles,drawable
I am trying to style a list item in android. I am using the following xml drawable: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true"> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape android:shape="rectangle"> <solid android:color="#882980b9"></solid> <corners android:radius="@dimen/margin"></corners> </shape> </item> <item...

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%; }...

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

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

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

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

WPF Button Background when IsEnabled = False

wpf,button,styles
I try to set a style for my button when it is not enabled so that the Background LinearGradientBrush is similar to the one set for the button when it is enabled. I have tried with Triggers but it seems that only the text Color is changing: <Application x:Class="RSPolar.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"...

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

How to base a style on an inherited style

c#,wpf,styles
So I have a Master Detail page. And in my Master page I have a style that will set the style for all buttons. Master Page <Style TargetType="Button"> <Setter Property="Background" Value="White" /> <Setter Property="TextBlock.TextAlignment" Value="Center" /> <Setter Property="RenderTransformOrigin" Value="-0.893,-11.7"/> <Setter Property="VerticalAlignment" Value="Center"/> </Style> in my Detail Page I have a...

No resource found that matches the given name '@android: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 '@android: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>...

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

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

How to delete overlay in an Android modified Holo button?

android,button,styles,overlay,android-theme
I have this style for Buttons in my Android app, but I don't want that little shadow. <style name="AppTheme.Button.Primary" parent="@android:style/Widget.Holo.Button"> <item name="android:background">@color/primary_dark</item> <item name="android:textColor">@color/primary_light</item> <item name="android:gravity">center</item> <item name="android:textSize">15sp</item> <item name="android:layout_width">20dp</item> <item...

Print a list with the original style

python,list,printing,styles
I'm using python and I've got a txt database with values like 24,50,55,5754 Now I want to print for example the last three digits in the same style: Output: 50,55,5754 I created a list: str.split(",") And then want to print: print (str[1:4]) However it then of course prints it like:...

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

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

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

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

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

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

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