SpeKtra
SpeKtra

Reputation: 35

How do i make a div to have the same image size in that div? but still have a consistent size for all images across the website?

So, I have the following right

#footer {
    clear: both;
    font-size: .84em;
    border-top: 1px solid #ddd;
    padding: 20px 0 0;
    text-align: right;
}

I would like a way to have all images under this div a certain size.

However my CSS code does have this

img {
    border-style: none;
    border-color: inherit;
    border-width: 0;
    height: 54px;
    width: 57px;
}

This happens automatically when i use Visual Studios Split View editor to resize an image. It's annoying you see, because it changes all the image sizes on my footer div as well, (starting to think it changes all img sizes across the whole page) where i have social networking buttons that end up massive! when i adjust the size of the image in the body of the page.

I want to keep my social media buttons small, and my body images a size set by me, say 255px by 225px.

Hope im making some kind of sense.

Also, in case you need it, this is my html

<div id="footer">
        <p>&copy; Copyright 2014 Music Club &minus; Design: Jade Powell</p>
        <img src="/images/facebook128.png" alt="Facebook" />
        <img src="/images/twitter128.png" alt="Twitter" />
        <img src="/images/google128.png" alt="Google" />
    </div>

Upvotes: 0

Views: 38

Answers (1)

Vitorino fernandes
Vitorino fernandes

Reputation: 15951

should be

This will style all the images which are under #footer

#footer img {
  border-style: none;
  border-color: inherit;
  border-width: 0;
  height: 54px;
  width: 57px;
}

Upvotes: 1

Related Questions