Hey there and welcome to the forums @denzelsugayan6884482
Could you please post your HTML and CSS so users can see what you are trying to do? It could be you are on the right track but have a small error somewhere in your code.
Note that HTML code must be formatted to display as code. In order to do this, simply press this button:
Then copy/paste your code between the two lines of backticks:
Are you stuck trying to target the image with a selector? Or are you actually having a hard time with the styling? To target it you could give the
<img> a class or an id:
And then target it by using that class or id;
// to use a class add a period to the class name
// to use an id add a pound sign to the id name
If you are having trouble with the actual positioning, I believe you can use all the same styling techniques as the
<div>, and there are oh so many.
For example, if you want an exact pixel position for your element you could declare its’ positioning as
absolute, which moves it to the browser top left corner, and then specify the values of
bottom to move it relative to that position of the screen:
// This will move the image 50 pixels down, and 50 to the right, of
// the top left corner.
If you want to position an element relative to its own position, instead of relative to the top left corner of the browser, you can specify its’ position as
relative instead of
If you would like to position the element relative to elements around it, you could specify its margin which changes the amount of space between it and the surrounding elements:
// this makes the element have at least 50px of space between itself and
// other elements.
To be more exact you can specify
margin-right, which change the space between elements on each of those sides.
This are of course only some basic ways of positioning an element and there are MANY more, but it should give you a good starting place.