# CSS Tip: Using CSS to Import Images

DevFeed: [CSS Tip: Using CSS to Import Images](<https://devfeed.tech/articles/css-tip-using-css-to-import-images-19652.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/using-css-to-import-images/>)

Author: Steve Hannah

Published: 2016-11-14T00:00:00Z

Content type: tutorial

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [CSS](<https://devfeed.tech/topics/css.md>), [App](<https://devfeed.tech/topics/app.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [css](<https://devfeed.tech/tags/css.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [images](<https://devfeed.tech/tags/images.md>)

## AI overview

This tutorial explains how to use the Codename One CSS plugin to import images as multi-images into an app's resource file. It covers using a CSS background image, specifying the source DPI, accessing the imported image from code, and importing multiple images in one selector.

## Source excerpt

The Codename One CSS plugin is a handy tool to style your app with CSS. This includes setting borders, padding, margin, fonts, colors, and pretty much everything else that you might otherwise do in the resource editor. However, there are some other cool things that this plugin can do for you, such as importing multi-images into your resource file. Let me demonstrate with a small snippet. __ In order to use CSS with your Codename One project, you will need to install CSS support in your project first. I'll use the MemeMaker demo as an example of how to do this. It has a CSS file located at "css/theme.css" within the project directory, and I've loaded this CSS file in my app's init() method using this code: