KeenUser
KeenUser

Reputation: 5525

How do I align in my image to move it vertically up?(CSS,HTML)?

A basic CSS/HTML question. As shown in my screenshot, there is an image of an arrow in the left, I want to move it in such a way that the mid point of the arrow is slightly above the mid point of the text following that. Probably this is basic stuff, but what property in css will help me do that?

I have a css class for the image something like this.

<img src="images/block_arrow.png" class="t-image imagestyle1" alt="image"/>

Thanks,Adarsh

Screenshot

Upvotes: 15

Views: 113264

Answers (1)

alt
alt

Reputation: 13947

Add following css..

.t-image {
    position: relative /* Declared position allows for location changes */
    top: -2px; /* Moves the image 2px closer to the top of the page */
}

Upvotes: 30

Related Questions