Help me with CSS and relative bg image positioning in divs!

Heyy,

Firstly I’ll start by showing the code, note this is just code I have typed in the message box.

html:

[php]

... [/php]

css:

[php]
.bg {
background-image: url("…/images/nav-bg.png");
background-image: no-repeat;
}
[/php]

What I want to do is move the image a little bit more to the right.
I have tried using the following:

[php]position: relative;
left: 30px; //30px for test[/php]

However that moves the whole div and not the image!

Question is: Is there some fancy css I can use to only move the image and could you give me a snippet?

Thanks :slight_smile:

I actually forgot about that!! Thanks :slight_smile:

Add the background image to a div in the html format code

and target the class .img in the css this will target only the image and not the div mate.

[quote=“haviland4, post:4, topic:555333”]Add the background image to a div in the html format code

and target the class .img in the css this will target only the image and not the div mate.[/quote]
No, this is not what I want.
I have resolved the issue already.

[quote=“my-swagger, post:5, topic:555333”][quote author=haviland4 link=topic=674525.msg4508540#msg4508540 date=1463254921]
Add the background image to a div in the html format code

and target the class .img in the css this will target only the image and not the div mate.
[/quote]
No, this is not what I want.
I have resolved the issue already.[/quote]

How did you resolve this issue? do you care to share?

[quote=“haviland4, post:6, topic:555333”][quote author=my-swagger link=topic=674525.msg4508556#msg4508556 date=1463302238]

No, this is not what I want.
I have resolved the issue already.
[/quote]

How did you resolve this issue? do you care to share?[/quote]
Did you not read the first post on this thread? By vain_? Not sure what you’re exactly after.