FAQ Database Discussion Community


Layouts with two different colors

android,android-layout,layout,background-color
I am trying to obtain something like this: by using A RelativeLayout with light grey (#EEEEEE) and a LinearLayout with a bit darker grey (`#9E9E9E), but despite the difference in color I am not obtaining a visible contrast... My code: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <!--android:background="@mipmap/background_poly"-->...

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

CSS Spinning Div Background Color

html,css,css3,background-color
I have implemented spinning divs using CSS animation. Each div has an image inside and an on hover the div spins. When spinning, the image should be hidden displayed and replaced with text displayed in the div with a specific background-color. I want background-color to be different for each div...

setting css - content as empty string changes the background

css,background-color
I display the post titles which is an unordered list in my title bar. Css for header is set as, .header{ background: #f0f0f0; box-shadow: 0 2px 2px -2px #777; *zoom: 1; width: auto; } .header:before, .header:after { display: table; } .header:after { clear: both; } But the background color (or)...

CSS: How to set up gradient background cross browser (only missing IE8 and IE9)

css,internet-explorer-8,internet-explorer-9,background-color,linear-gradients
I have created my own navbar and would like to set up a simple gradient background color for it. So far I have the following which works fine for me in newer browsers but I am not sure what I have to add here to cover IE8 and IE9 as...

Android app layout background shows through controls in layout

android,android-layout,background-color
I have an Android app with a GridView where each item is a LinearLayout of two Buttons and two TextViews. When I set the LinearLayout's background color to white, the buttons are grey. However, if I change the background color, the surface of the buttons also get tinted with that...

My div background color won't show up

html,css,background-color
I'm building a basic webpage to practice HTML, but am having trouble right off the bat. Here is my HTML: <!DOCTYPE html> <html lang=“eng”> <html> <head> <meta charset="utf-8"> <link type=“text/css” rel="stylesheet" href="style.css"> <title>Greg’s Page</title> </head> <body> <div ID=“header”>Hello</div> </body> </html> And here's my CSS: #header { height: 15px; width: 100px;...

Change SVG image color using Css or do it manually in SVG file

html,css,svg,background,background-color
I have a svg picture file, but the content inside is black, and I need a white, I tried to add background-color property to style attribute of svg file, but Image still black, I trying to find solution in Internet, and I found, but I cant use jQuery or some...

JButton variable not found

java,swing,radio-button,awt,background-color
I am trying to change the background color on click of a radio button, but the second radio button, "bt2" variable is not found by the compiler. I keep getting this error message: "cannot find symbol bt1" in the e.getSource()==bt1 Here is my code: public class ColorChooser extends JFrame implements...

Nested divs background colour anomaly [closed]

css,wordpress,background-color
I've a small anomaly ('problem' is not a permitted word ;-)) with setting the background colour in nested divs which is driving me potty. I manage the site at www.teachtoo.org which is Wordpress-driven. I'm trying to set (using the very handy Jetpack CSS editor) the background colour of the 'bar'...

Qt quick ApplicationWindow 'color' for background color doesn't work

qt,background-color,applicationwindow
I created a simple Qt quick application with a single main.qml, which is like the code below. The problem is the background color of window wasn't set to #ffffff, instead it's set to light gray (the default color of window on Windows I thought). The rectangle's color is set correctly....

Shaded tittle does not displayed properly

html,css,colors,background-color,shadow
I list my projects here. All share the same style for the tittle, with a dark background for the inner body of the border the tittle lives in. However, my latest project got a logo ( :) ) which does not allow for a dark background. The reason as you...

Setting % of a background color programmatically

android,view,gradient,background-color
Say I want to color only 64% of the background of a linearlayout. I want to color it from left to right and have it be a solid color. At first I tried using Gradient Drawables because it allowed me to specify the orientation of the color, and the color...but...

Color/background-color change animation in jQuery

javascript,jquery,animation,background-color
I'm trying to do animation of color change in jQuery. But it failed. JS Bin $("#circle").click(function(){ $(this).animate({ backgroundColor: "#eee", width:"300px", height: "300px", borderRadius: "150px", }, 2000); }); I know there's one similar answer on Stack Overflow, but it's years ago. So I ask again for potential newer answer to this...

ListBox specific row/item coloring Diffrent Color C# wpf

c#,wpf,xaml,listbox,background-color
I need to Mark the first item in the ListBox in a different way like in a different color. if i have listbox is there a way to color the first item in it Red preferred programmatically. ListBox: List<CartItem> CartListItem = CartItem.getListOfCartItems(myCart, Items); dgProduct.ItemsSource = Items; Xaml <ListBox Name="dgProduct" HorizontalContentAlignment="Stretch"...

Three colors angled background color

css,css3,background-color,css-shapes
How could I achieve a background that looked similar to this image: Only 3 colors, angled from the top corner out like a sunray. Maybe sticking with a simple PNG or SVG background image would be a better approach....

CSS different backgrounds for different divs

css,css3,background,background-color,opacity
Something's not working. The code is here: bambakids.com/menu Content: index.html jquery.easing.1.3.js smoothscroll.js CSS Folder: css/style.css Let me know if you want the images too, although they shouldn't matter. Goal: For there to be a different background color on the contact div then on the main one (headermenu)...

google charts change background color

charts,background,google-visualization,background-color
I saw some previous questions/answers here on StackOverflow but none of the code provided in those answers seemed to work with my chart: Here is my code: <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("visualization", "1.1", {packages:["bar"]}); google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Month', 'Sales', 'Expenses'], ['January', 200, 150], ['February',...

Fluid 2-col layout issues. inline-block elements overhanging the edge of the container

background-color,css
I'm trying to use 2 column fluid layout in my footer. The right side column in the footer has a list of inline-bock elements - social icons. This works well until you start to re-size the width of the browser. At one point the social icons start to overhang the...

VBA sum by color function code

excel,vba,excel-vba,sum,background-color
Hey guys I need some help. Below I placed a function code to sum cells by color then I wrote a sub to execute the function. I keep getting a Run-time '1004' error. I don't know What part of the sum by color function formula or my criteria ranges is...

Checking code change background image with over link with jquery

jquery,css,background-color
I have this code. The idea is that when the mouse is on hover the link the background-image of a div changes and when is not, shows the original image. I´ll do it with 5 links but at the moment I can´t make it works even whit one. SCRIPT JQUERY...

CSS jQuery order issue

jquery,css,background-color
below is jQuery code I have used for cycling advert banner. For some reason the background colour is changing before each image fades out, despite having it the other way around in the code? Does anybody know where I might be going wrong here? Thanks. The '#contentHome' Div is a...

Ionic framework: Different background color for each list-item

css,ionic-framework,background-color,ionic
I would like to have a different background color for every list-item using ionic. For example a list of fruit containing: banana, apple, orange... For banana the background would be yellow For apple, it would be green For orange, it would be yellow ... Does anyone have an idea on...

Background color of active item of navbar on Bootstrap

html,css,twitter-bootstrap,background-color
I have now this navbar: But I want to remove that grey color of the background of the active item... I'm trying with this code: .navbar-default .navbar-nav > .active{ border-bottom: 2px solid black; background-color: #fff; } And it has added the black border, but the background has not changed to...

Resetting the background color of jtextfield that has been changed

java,jtextfield,background-color
I have a set of jtextfields. Now, there are two different background colors i've used, the null and white. I also have a highlighter which changes the clicked textfield (given that it is enabled) to green when focused. My problem is when the focus is lost, I cant seem to...

Is there an efficient way to automatically display all HTML colors of a Webpage? [closed]

html,css,background-color
my idea is quite simple, but I hope there is already something around that solves it more efficiently. So hopefuly somebody can point me in the right direction... The Problem: Quick Hex-Code based verification of Website-Colors. You have your page; you have a design from your creative guy; now you...

Special sized-color behind element with HTML and CSS

html,css,background-color
I am trying to color in an element in HTML with CSS but I want the color to be a certain size, relative to the text. I want the color to be about 1/2 as tall as the text and slightly longer. Any way I try to do this messes...

Change layout color by clicking a submenu item

android,layout,background-color,submenu
I'm a newbie with Java and Android, and currently I'm working on a simple app which has a menu button, with several submenu items. Basically, I'm learning stuff by creating this app. What I want to do? I would like to change the main layout color by clicking those submenu...

css height 100% breaks layout in bootstrap

css,twitter-bootstrap,background-color
Why does height: 100%; break the layout on one page, but seem required on another in Bootstrap? CSS: body { height: 100%; } -- Not Broken (background spans full page): http://emailscout.io -- Broken (background stops before end of page): http://emailscout.io/results/?domain=example.com HTML: https://gist.github.com/anonymous/60cdd52499aa6808bf14...

Jquery - coloring the background of all id

jquery,css,background-color
In the html file below, the jquery is not coloring the background of all id="0". The jquery this only coloring the only the first id. How can I make all id="0" are colored with jquery? <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <table> <tr> <td align="center" style="padding-top: 15px;" id="0">0</td> </tr> <tr> <td align="center" style="padding-top: 15px;"...

Get ImageButton background color

java,android,android-layout,background-color,imagebutton
if you take a look at this link as an excample http://www.mkyong.com/android/android-imagebutton-example/ My question is How can I get the ImageButton Background Color when the user clicked on that ImageButton? Thanks. Instead of showing a message... Toast.makeText(MyAndroidAppActivity.this, "ImageButton is clicked!", Toast.LENGTH_SHORT).show(); I would like to get the color value, so...

Change layout background color on button click

android,android-linearlayout,background-color
I'm getting an error when trying to set the background color of a layout I get a nullpointerexception and I don't know why. I've looked at various posts (like this Change background color on button click?) and my code seems correct, but still the layout doesn't seem be called. This...

How can I make a textfield highlight in red only after its input is proven as incorrect?

javascript,html5,css3,user-input,background-color
I have this form (Horribly basic and messy at the moment, I know.): This is how it looks on-load. Here is my CSS: img { position: fixed; right: 100px; top: 100px; } input:invalid { background-color : #ff0000; } input:valid { background-color : #99ff99; } What I want to know is...

CSS: TD background color causing borders to disappear

css,border,background-color,border-color
I have a large HTML table that is created dynamically. The table has a standard structure, incl. colgroup, thead and tbody and the below styles. So far everything works as intended but when I add the class "bgGrey" to the TDs in one colum (see below) in order to give...

Changing the colour of background behind image css

css,background-image,background-color
In CSS I'm using a gif as a background image: background: url(http://*URL of gif*) no-repeat 50% 50%; but depending on screen size I can still slightly see the background behind that image(it is white). How do I change the colour behind that image? I want to change it to be...

Changing the background colour of a class in CSS not working?

css,class,background-color
I am trying to change the background-color of an h1 class, but any changes I try to make have no effect, this is the code I have written: .entry-title { background-color: #f0eaca; } The title appears white instead of beige like everything else: https://apatheticpaper.wordpress.com/2015/02/13/raf-simons/ Any help would be greatly appreciated....

DataGridView, How to use if statement for a cell that starts with a string

c#,datagridview,background-color,cells
I would like to be able to use an if statement to determine the colour of a DGV cell that starts with a string "Manual". I know how to change the cell's colour if (Convert.ToString(DGV_Points.Rows[x].Cells[2].Value.StartsWith) == "Manual") { } Also is it possible to disable the restoration of the cell's...

CSS issue - Background-Color not responding in - Magento style.css

css,magento,background-color
I am trying to change the background color of the Shopping Cart title block. Website: http://www.statis-online.com/checkout/cart/ (Cart in Header-Right) When I added background-color: #000468; to .block-cart { margin-bottom: 0px; margin-bottom: 0px; width: 165px; height: 30px; position: relative; top: -33px; right: 10px; } It showed a blue line, but not whole...

Swap background-color of an specific div with switch/case

javascript,css,switch-statement,background-color
Im trying to swap the background-color of some divs specificly because of their content. The thing is, their background-color should swap when their input is like "Lifestyle" or "Politics" or "Economy" or "Local" or "Sports" or "News". var colorInput = document.getElementById('views-field-field-section').textContent; switch (colorInput) { case 'Lifestyle': document.getElementById('views-field-field-section').style.backgroundColor = '#9518b8'; break;...

how to see background color of div when if move on image

html,css,background-color
My Code: FIDDLE HTML: <div class="d1"> <img src="http://i57.tinypic.com/30cw0ut_th.png"> <div class="d2"> Pic 1 </div> </div> CSS: .d1{ width: 100px; height: 100px; border: 1px solid #000; overflow: hidden; background-repeat: no-repeat; background-position: 50% center; background-size: 100% auto; visibility: visible; } img{ width: 100%; height: 100%; } .d2{ margin-top: -50px; margin left: 20px; background-color:...

Watchkit: Is it possible to add an image behind a WKInterfaceLabel?

swift,background-color,watchkit,wkinterfacelabel
I am trying to add an orange circle with a number (my number will change depending on certain circumstances) inside it in my WKInterfaceGroup like the image below. However, it appears you can't change WKInterfaceLabel background color. The only solution I can think of is to add an image behind...

What is the html for color “Olive Green, Accent 3, Lighter 60%”?

html,css,background-color
I want to set the background color of an HTML table element to: "Olive Green, Accent 3, Lighter 60%" But I can't seem to to find its color code. I have checked this site http://amalfaro-wrk.tiddlyspace.com/Interface.ColorSchemes but they only have the code for: "Olive Green, Accent 3, Lighter 80% which is...

Alternate table row color using CSS, individual cells get colored not the even rows

html,css,table,css-selectors,background-color
somehow I can't figure out the following: Alternate table row color using CSS? If I use the code suggested in the aforementioned topic the even cells get colored (the first, third and fifth. There is a total of 5 cells in a row). It doesn't matter if I use 'even'...

Two colors background Android

android,android-layout,android-activity,background,background-color
I am programming an Android activity and it should have a background of a color in its upper side and another color in its bottom side. The relative layout used is padded. What I usually do is using non padded relative layout and dividing it in in upper and bottom...

select onchange local storage not working in firefox

javascript,firefox,local-storage,background-color,onchange
I found similar Question but answers were with Jquery or not working in this particular case. i have the following HTML code <html> <body onload="load()"> <div> <select id="colorlist" onchange="saveSelect()"> <option value="white">White</option> <option value="#E0C2FF">#E0C2FF</option> <option value="orange">Orange</option> <option value="purple">Purple</option> </select> </div> </body> </html> and the following javascript code which works in Chrome...