I have a column (lets assume the width is 40px) and there I have some rows. The height of the rows depends on the length of text (if the text is long then there is a break line and therefore the height increases).
Now I want to display an icon in each row next to the text to show the user for example that he has already completed something in that tab. So I was trying to solve this by using only css. So if the user completes a tab then I change the css of that row. However, I'm not able to add to that row an image without that the image is being repeated.
I'm using this css code:
padding: 0 8px; padding-top: 8px; padding-right: 8px; padding-bottom: 8px; padding-left: 8px; overflow: hidden; zoom: 1; text-align: left; font-size: 13px; font-family: "Trebuchet MS",Arial,Sans; line-height: 24px; color: black; border-bottom: solid 1px #BBB; background-color: white; background-image: url('images/checked.gif'); background-repeat-x: no-repeat; background-repeat-y: no-repeat;
Does anyone know how to do that?
If you want the background image not to repeat at all, use background-repeat: no-repeat; .
By default, a background-image is repeated both vertically and horizontally. Tip: The background image is placed according to the background-position property. If no background-position is specified, the image is always placed at the element's top left corner.
Description. The background-repeat CSS property specifies whether the background-image is repeated or tiled after it has been sized and positioned, and how. It is often more convenient to use the shorthand background property.
Instead of
background-repeat-x: no-repeat; background-repeat-y: no-repeat;
which is not correct, use
background-repeat: no-repeat;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With