Is there an easier way to display/create rollover images than batching in Photoshop/Fireworks? - photoshop

Is there an easier way to display/create rollover images than batching in Photoshop/Fireworks?
Ideally this would be done through CSS or Javascript, somehow creating a semi-transparent white layer over an image when moused over. Currently I just have Photoshop process images with +10% brightness, and do the rest in Dreamweaver with find/replace.
It'd be nice not to have to create separate rollover images for each picture. Thanks!

Using css, you can use something like this:
#navigation a {
background:url(image.png) no-repeat;
filter:alpha(opacity=100);
opacity: 1 }
#navigation a:hover {
filter:alpha(opacity=80);
opacity: 0.8 }
More info here

With images you don't always have to create a new image for rollovers, you can edit the CSS to decrease the opacity of the element:
.myElement
{
background.image: url(path/to/file/image.png);
}
.myElement:hover
{
filter:alpha(opacity=50);
-moz-opacity:0.5;
-khtml-opacity: 0.5;
opacity: 0.5;
}
Also I think you'd benefit from looking into CSS Sprites:
CSS-tricks sprites tuorial
A list apart's CSS sprites
Css sprites.com generator

Related

How to change the slider color in Google MDL Lite

I need change the slider color in Google MDL Lite.
http://getmdl.io/components/index.html#sliders-section
The colors of the lines on the left and right of the circle are changing, but the circle is staying blue.
Any ideas.
Thanks.
At first, for customizing colors there is perfect Customizer and it will do what you need.
But answer for your question are these lines (rather test it in all browsers):
.mdl-slider {
&:active::-webkit-slider-thumb,
&::-webkit-slider-thumb {
background: $your-color !important;
}
&:active::-moz-range-thumb,
&::-moz-range-thumb {
background: $your-color !important;
}
&:active::-ms-thumb,
&::-ms-thumb {
background: $your-color !important;
}
}
However, there are focus color and other fixes for IE. So if you want to be 100% sure, copy this file with slider style and change color variables ($range-color, $range-bg-color, $range-faded-color etc.) by your requirements. Or use first mentioned solution.

How can i add an image as background in Chartjs?

I am using chart.js lib on a programmable device i need to add an image as background to my chart, if that is not possible how can i change background color to black?. I cannot use Jquery as it is not supported by the Platform.
Thank you
Thank you!
I didn't think to CSS, i added an image too in a similar way
canvas {
background-image: url(backgroundimage.jpg);
}
You can style the canvas element. Something like this will work
canvas {
background-color: black;
}
Fiddle - https://jsfiddle.net/w1yhp03h/

Python module Pisa: how change background color for all page?

How i can change background color of all page?
like this :
body,div { background-color:#f4f4f4; }
Now background changes only for div with information, remaining page have white color. if it is possible, can you write example?
P.s. How i can draw border around ?
Acording to the documentacion https://github.com/chrisglass/xhtml2pdf/blob/master/doc/usage.rst#supported-page-properties-and-values #page only accept few css propierties:
background-image
size
margin, margin-bottom, margin-left, margin-right, margin-top
So maybe the easyest is to make a jpg to draw the background with background color and border. And use that image in background-image propierty:
#page {background-image: url('local_path/to/your/image.jpg')}
I hope this will help you
html,body{height:100%}
body,div { background-color:#f4f4f4; }
and your Second Question > How i can draw border around ?
add
border:1px #ccc solid

Dojo - Tree in accordion is broken (while outside is ok) , Why?

I've made simple application with dojo.
I took the exact same combo tree (cbtree) and put it once inside accordion and once first on page.
I don't understand why inside the accordion I get different cbTree (it looks really bad)
Here is online example of the problem :
http://77.235.53.170/cbTree/cbTree.htm
The problem is at your main.css, you have
#leftCol img {
width: 100%;
}
Which overwrites
.dijitFolderOpened, .dijitIconFolderOpen, .dijitIconError {
background-image: url("../../icons/images/commonIconsObjActEnabled.png");
width: 16px;
height: 16px;
}
You need resolve this in main.css by either removing your style, or changing it to a more specific rule; i.e. instead of #leftCol img, use #leftCol .yourClass.

Fullscreen slideshow with vertical carousel.Fading in of fullscreen image issue

I made a vertical carousel which consists of images that when clicked should be visible fullscreen. But the problem is i'm not able to figure out how to make sure the fullscreen images are preloaded or something and works like the thumbnail images(getting preloaded).
I'm not sure what approach to follow for preloading the fullscreen images using css background and how to make sure the images fadeIn or just some transition when i click on the thumbnail in the carousel.
Please have a look at the following link where my code is uploaded.
http://www.lluvia.me/slideshow/carousel.html
If its convenient,feel free to check the script by checking the source.
Help would be appreciated. Thanks!
Found this post and figured it might help you, Preloading images with jQuery
Try and post some of the code in your body for future reference. :)
Quick and easy:
function preload(arrayOfImages) {
$(arrayOfImages).each(function(){
$('<img/>')[0].src = this;
// Alternatively you could use:
// (new Image()).src = this;
});
}
// Usage:
preload([
'img/imageName.jpg',
'img/anotherOne.jpg',
'img/blahblahblah.jpg'
]);
Or, if you want a jQuery plugin:
$.fn.preload = function() {
this.each(function(){
$('<img/>')[0].src = this;
});
}
// Usage:
$(['img1.jpg','img2.jpg','img3.jpg']).preload();
Alternatively, if you want to stick purely with CSS check out this page: http://perishablepress.com/3-ways-preload-images-css-javascript-ajax/ You can just have the background image be positioned off screen then come on screen when needed.
#preload-01 { background: url(http://domain.tld/image-01.png) no-repeat -9999px -9999px; }
#preload-02 { background: url(http://domain.tld/image-02.png) no-repeat -9999px -9999px; }
#preload-03 { background: url(http://domain.tld/image-03.png) no-repeat -9999px -9999px; }