Linked Questions

444 votes
35 answers
1.1m views

I have a div 200 x 200 px. I want to place a 50 x 50 px image right in the middle of the div. How can it be done? I am able to get it centered horizontally by using text-align: center for the div. ...
Shameem's user avatar
  • 14.4k
64 votes
3 answers
163k views

i have problem with image vertical-align in div .img_thumb { float: left; height: 120px; margin-bottom: 5px; margin-left: 9px; position: relative; width: 147px; background-...
aainaarz's user avatar
  • 902
14 votes
1 answer
24k views

I'm currently trying to center an image inside a div that has it's dimensions set with vh. I tried using the display:table-cell; method which centered the image but began messing with the vw of other ...
kduan's user avatar
  • 659
60 votes
0 answers
130k views

Possible Duplicate: How to properly vertically align an image Image size changes but the div size is fixed These are CSS but not working. Is it possible to achieve this without using background ...
Furkan Gözükara's user avatar
2 votes
2 answers
11k views

I'm trying to center an image which is contained in a div with display set to table. In it, I wish to display an image, which should be positioned in the center, both vertically and horizontally. I ...
user1038814's user avatar
  • 9,699
4 votes
2 answers
5k views

I could use some help, aligning images (different sizes) at the middle of a container div. Have made a picture where you can see the div (the gray background) and that the images should align in the ...
Mikkel's user avatar
  • 1,811
2 votes
1 answer
9k views

I want to vertical align an IMG in a DIV but I don't see what I'm doing wrong. It works in FF and IE7, but other browsers just align it to the top. Code can be found here: http://disgeae.nl/...
Disgeae's user avatar
  • 80
2 votes
2 answers
2k views

I need to overlay a microphone icon over an image (kind of watermark). Need this icon to be centered horizontally and vertically. The image may be resized depending on the browser size but the ...
Bronzato's user avatar
  • 9,416
0 votes
1 answer
4k views

I'm having issue with fixing icon in the middle of my div. I just want to know how to fix material-icons icon-def in div collapse menu trigger. Thank you for answering me. In jsfiddle it's working, ...
mckvak's user avatar
  • 411
0 votes
1 answer
1k views

I am trying to align an image with a div that contains two rows of text like this: Here is my current <div class="first-div"> <img class="img" src="/image-icon.png" /> <div class=...
ricks's user avatar
  • 3,324
0 votes
1 answer
1k views

Can someone help and tell me how I can center an image inside the circle as show in the image below. Before writing this post I spend some time looking for an answer but I could not find out how. ...
Mohamed Necib's user avatar
1 vote
2 answers
1k views

I want to horizontally align center the div with the red border and vertically align middle the image. Vertically align middle is working but horizontally align center is not working. Here is my code: ...
Boidurja Talukdar's user avatar
0 votes
2 answers
536 views

I have a school project and I want to make a contact us page for my website. What I want to do is center the social media icon inside a circle. I have included a code sample below. .ul2{ display:...
Aditya Bavigadda's user avatar
0 votes
1 answer
681 views

I have a question, how can I center the image inside the div? to have text on the left and image on the right. The height of this div is not set in the CSS, because I want it to increase automatically ...
Gad's user avatar
  • 29
2 votes
3 answers
171 views

I have been trying to play around with CSS but still can't get this right. What I am trying to make: Basically, the content area is the image. div.logo-content-background { position: fixed; ...
Student04's user avatar

15 30 50 per page
1
2 3 4 5
12