Always aligns left

SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
Watch

Ferenzcy

Established Member
Impact
13
I am redoing my website and i am going to be using this css trick for fluid images

img {
display: block;
border: 0;
max-width: 100%;
height: auto;
}

It seems to work very well except the images always align to the left after i have added this to css. I have the container set to align center by default.
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
This problem is coming because you set max-width to 100%.. Put it to 50%, it will set your image to the center ..
 
2
Close
frank00 is right! Try changing max-width to 50-60% and see the changes entirely.
 
1
Close
CatchedCatched

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Search: choose where to search from the All tab
Open the search at the top of any page. On the All tab, the list next to the search box lets you choose where to search: everything, all...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back