Forum Moderators: not2easy

Message Too Old, No Replies

CSS for image location in the header

CSS code for image in header

         

mani_r

9:01 pm on Jan 1, 2015 (gmt 0)

10+ Year Member



Hey everyone

Happy new year :)

I am trying to insert an image into the header of my website, so far I have been successful, however the only issue is the I don't know how to change the position of the image!

I am using the following code:
header {
background-image: url(http://folder.example.com/static/54709596e4b08efc8c7642a8/t/54a58eaae4b0ab38feda62dd/1420136106808/Call+Now.png);
background-repeat: no-repeat;
background-position: right;
}

I have tried inserting the padding line but that did not work as I was probably doing it wrong, as it's my first attempt at CSS.

Any ideas on how to fix this?

Many thanks in advance

[edited by: not2easy at 9:12 pm (utc) on Jan 1, 2015]
[edit reason] exemplified domain per TOS [/edit]

not2easy

9:17 pm on Jan 1, 2015 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Hello mani_r, welcome to the forums, and a Happy New Year to you as well.

Regarding the css question, is the header class applied to any container or within a container element?

mani_r

9:50 pm on Jan 1, 2015 (gmt 0)

10+ Year Member



Thanks for your response.

I am not sure to be honest with you. I'm using Squarespace which offers built websites that you can modify, and for this particular task I need to provide custom CSS, is there any way I could find out?

lucy24

11:27 pm on Jan 1, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I don't know how to change the position of the image!

Well, someone does:

background-position: right;

mani_r

11:34 pm on Jan 1, 2015 (gmt 0)

10+ Year Member



Thanks for your reply.

I actually just figured it out, I noticed that line and put some numbers in instead of "right" and it worked :)