user2296045
user2296045

Reputation: 1

Resize 1st Image with css

I am using this for auto resize in css

.maincont img {
    border: medium none;
    padding: 5px;
    width: 350px;
    height: 450px;
}  

But it resize all the image in my post. I want to resize it only for my 1st image other image remained unchanged. Any solution ?

Upvotes: 0

Views: 37

Answers (1)

Yuriy Galanter
Yuriy Galanter

Reputation: 39777

You can try first-child pseudo-class:

.maincont img:first-child {
    border: medium none;
    padding: 5px;
    width: 350px;
    height: 450px;
}  

Upvotes: 1

Related Questions