Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Image size different in different browsers

Featured Replies

Hi,

 

Please help me with image size issue.

 

I created the website but when I upload it in a server. I see that the image which is the logo has a different sizes in different browsers for example, it is very large on Chrome but it will be in a normal size when I refresh the browser and it is very small on Safari and I still do not know how to solve it but it works okay on Firefox.

 

This is the responsive website. Here is the link http://kclarkwebdesi...site/index.html

 

Thank you for your help.

Hi, I would suggest adding in the height as well as the width you wish the image to show. Since the actual is 411 x 66 to display as 450 wide you should use a height of 72 to keep the proportions. Also it appears that you are trying to make the image a link

<h1 class="logo"><img width="450" alt="Kissane Associates" src="image/Kissane-Associates-logo.png"><a href="#">Kissane Associates</a></h1>

without actually anchoring the image. I do not know if the h1 class logo is important as I have not checked the style behind it but would suggest

<a href="#"><img src="image/Kissane-Associates-logo.png" width="450" height="72" alt="Kissane-Associates"></a>

would work better, and you could wrap it in the h1 class logo if required. Jim

 

I think this could be your problem

 

header h1.logo img {
width: 100%;
}

 

edit: tidy the html up as well

 

http://validator.w3.org/check?uri=http%3A%2F%2Fkclarkwebdesign.com%2Fkissane%2520associate%2520website%2Findex.html&charset=%28detect+automatically%29&doctype=Inline&group=0

Edited by ELITE

...and delete the width="450" in the markup as this is after the stylesheet codes so it will take precedence which you don't want

<h1 class="logo"><img alt="Kissane Associates" src="Kissane-Associates-logo.png"><a href="#">Kissane Associates</a></h1>

Edited by Wickham

Try to make below change :

 

 

@media only screen and (max-width: 767px) {

 

#toplogo img {

max-width: 100%;

display:block;

}

 

}

 

I;ve tested your code into local pc there is not any issue. But on your link issues replicated.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.