How to completely remove borders from HTML table

<table cellspacing=”0″ cellpadding=”0″> And in css: table {border: none;} EDIT: As iGEL noted, this solution is officially deprecated (still works though), so if you are starting from scratch, you should go with the jnpcl’s border-collapse solution. I actually quite dislike this change so far (don’t work with tables that often). It makes some tasks bit … Read more

Background Image Placement

You’ll have to create a custom bitmap drawable with your bitmap in an XML file (eg “res/drawables/my_drawable.xml” <?xml version=”1.0″ encoding=”utf-8″?> <bitmap xmlns:android=”http://schemas.android.com/apk/res/android” android:src=”https://stackoverflow.com/questions/2781593/@drawable/my_png_file” android:gravity=”bottom|left” /> And then set this drawable xml as your view’s background (“@drawables/my_drawable”). The drawable XML format is very poorly documented in the Android site, though, so it’s definitely not an easy … Read more

Symfony2 – Assetic – load images in CSS

use the cssrewrite filter from Assetic bundle In config.yml: assetic: debug: %kernel.debug% use_controller: false filters: cssrewrite: ~ And then call your stylesheets like this: {% stylesheets ‘bundles/cmtcore/css/*’ filter=”cssrewrite” %} <link rel=”stylesheet” type=”text/css” media=”screen” href=”https://stackoverflow.com/questions/7044631/{{ asset_url }}” /> {% endstylesheets %} Oh and don’t forget to use php app/console assetic:dump

background-size: cover not working on iOS

This happens, particularly on iOS, when you have background-attachment:fixed. On mobile, I usually put background-attachment:scroll inside of a @media query. As @RyanKimber pointed out, fixed attached images use the whole <body> size. On mobile this can get really tall which blows your image out. Setting the attachment back to scroll allows your cover image to … Read more

Android: textColor of disabled button in selector not showing?

You need to also create a ColorStateList for text colors identifying different states. Do the following: Create another XML file in res\color named something like text_color.xml. <?xml version=”1.0″ encoding=”utf-8″?> <selector xmlns:android=”http://schemas.android.com/apk/res/android”> <!– disabled state –> <item android:state_enabled=”false” android:color=”#9D9FA2″ /> <item android:color=”#000″/> </selector> In your style.xml, put a reference to that text_color.xml file as follows: <style … Read more

How to add a background image on top of a previous background image?

You can consider CSS variables. Specify 2 background layer that you can change later. You can easily scale to any number of background: .container > div { background: /*we make the default value a transparent image*/ var(–im1,linear-gradient(transparent,transparent)), var(–im2,linear-gradient(transparent,transparent)); height:200px; width:200px; display:inline-block; } .background1 { –im2: url(https://picsum.photos/200/300?image=0); } .background2 { –im2: url(https://picsum.photos/200/300?image=1069); } .backgroundFilter { –im1: … Read more

Is there a way to set background-image as a base64 encoded image?

I tried to do the same as you, but apparently the backgroundImage doesn’t work with encoded data. As an alternative, I suggest to use CSS classes and the change between those classes. If you are generating the data “on the fly” you can load the CSS files dynamically. function change() { if (document.getElementById(“test”).className == “backgroundA”) … Read more

tech