What are the various methods for incorporating icons and logos into website design?

Can anyone provide insights on the quality of logos and icons used in professional websites? I often create logos and icons using Illustrator, but when comparing them to icons on websites like those shown in the provided image and links, mine appear blurry with unclear edges.

https://i.sstatic.net/irjvd.png

  1. My own Blog showcases poorly made icons - the logo and menu icon are both PNG images.
  2. The Entrepreneur website boasts crisp menu and search icons. Upon inspecting their mobile site, it seems they use pseudo elements for these icons. How does this technique contribute to higher quality?
  3. A similar situation can be seen on the Times of India website, where the menu icon is created using an hr tag. However, the search icon uses a pseudo element, which adds an element of mystery to its quality.
  4. Furthermore, sites like Business Insider employ a single image for all icons. How is this achieved, and what advantages does it offer over individual images? By analyzing the URLs for the menu and search icons on these sites, a deeper understanding of their techniques may be gained.

I am keen to learn more about how these icons render and why the quality of my own logos/icons falls short. Should I refrain from using images altogether? Despite numerous attempts at exporting from Illustrator with the correct dimensions, the quality still disappoints. For instance, the middle horizontal bar on my blog's mobile site appears blurred despite looking sharp initially. What could be causing this discrepancy?

If possible, I would appreciate any relevant resources or links that delve into these topics further. Thank you.

Answer №1

If given the chance, I would happily give @marc-b five upvotes :) The first important step to take before seeking help on SO is attempting to solve the issue yourself. Then, you can reach out to us with an on-topic question. In this case, the initial step involves right-clicking on one of the icons that pique your interest and selecting "inspect."

There are a couple of questions to address here: how can one create crisp images, and what's the concept behind having multiple images in a single file? Both queries are easily searchable via Google, but let me provide you with a head start:

Two common methods for achieving crisp images include:

  • Utilizing SVG (vector graphics - as someone who uses Illustrator, you likely understand the distinction between vector and raster graphics and why the former offer better crispness. If not, search for "vector raster difference" on Google.)
  • 2x images - this technique involves creating an image twice the final display size and then using CSS to resize it. Scaling within the browser results in crisper images compared to displaying a 1x image.
  • When multiple images are housed in a single file, it is referred to as a "sprite." This can be a raster sprite or an SVG sprite.

For further exploration, here's an introduction to SVG https://css-tricks.com/using-svg/, a primer on sprites https://css-tricks.com/css-sprites/, information on SVG sprites https://css-tricks.com/svg-sprites-use-better-icon-fonts/, and details about the latest addition, srcset https://css-tricks.com/responsive-images-youre-just-changing-resolutions-use-srcset/

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Which JQuery plugins can transform regular <select> dropdowns into more stylish options?

After an extensive search, I was only able to locate one solution at this link. I scoured the entire internet for alternatives. ...

What is the method for utilizing script bundles in pure HTML (not cshtml)?

After reviewing the following two questions on Stack Overflow, I made sure not to ask a duplicate question: 1) @Render.Scripts in plain .html file - not in .cshtml 2) Rendering the script bundle in a plain HTML page I am curious about how to incorporate ...

The CSS infinite animation becomes erratic and sluggish after a short period of time

My website featured a banner with a series of thumbnail images that animated at different intervals and looped indefinitely. Initially, the animations ran smoothly, but after a few seconds, they began to slow down and lose consistency. To troubleshoot, I u ...

A reliable approach for dynamically altering SVG graphics

It seems like IE10 does not support CSS transformations for SVGs, only attribute transformations. Here is an example: <svg><rect id="myrect" width="200" height="200"></rect></svg> setTimeout(function() { var r = document.getE ...

When I test my jQuery scripts in jsfiddle, they run smoothly. However, they do not seem to work properly when I

My code is almost perfect, but the jQuery function is giving me trouble. It works fine in jsfiddle, but for some reason, it's not functioning in my HTML file. I don't believe extra characters are being added when copying from the HTML file. I hav ...

Elements styled as inline blocks with static dimensions, irregular in size

Is there a way to ensure that all three boxes are displayed at the same level? Currently, box 2 appears below box 1 and 3 due to having less content. I believe there must be some styling element missing to make each div display at an equal level regardless ...

Is there a way to extract all the data values starting with "data-" from the selected input fields in HTML5 and compile them into an object?

Looking for a way to automate input values: <input class="form" type="checkbox" name="item1" data-value="{ 'item1':'selected', 'price': 100 }" checked="checked"> <input class="form" type="checkbox" name="item2" data- ...

There seems to be a problem with the responsive navigation menu when activated in responsive mode and then resizing the screen

Trying to create a responsive navigation but encountering issues when following these steps: 1. Resize the navigation to less than 940px 2. Activate the menu 3. Resize the browser again to more than 940px 4. The menu is no longer inline and appears messy ...

CSS: Caption text below image remains on same line

I am struggling with positioning a div that contains an image and a caption. My goal is to make the caption break into a new line when it reaches 95% of the width of the image. Despite my efforts, I can't seem to achieve this. The text always pushes ...

Issue with symbol not rendering correctly in Email Body when setting width to '100%' in Postman

I'm currently working on sending emails using APIS in NodeJS. The issue I am facing is related to the CSS code with '%' symbols triggering errors when attempting to send the email via Postman, resulting in a 500 error. However, removing the ...

Assign a new class to the anchor tag that has a distinct ID named "link"

I want to add the CSS class "active" to the anchor tag that contains the ID currently active in the URL. Here's what I've tried, but I'm unable to get window.location.hash to function properly. $( "a[href=' + window.location.hash + &ap ...

Reviewing code for a simple form and box using HTML5 and CSS3

I have developed a compact form as part of a larger webpage, proceeding step by step according to the specified requirements. I am wondering if there could have been a more efficient way to code this. Perhaps streamlining the code or utilizing different c ...

Issue with BeautifulSoup(page.content,'html.parser') not returning accurate content during web scraping

While attempting to scrape data from the AJIO website, I encountered an issue where the content retrieved by Python did not match what I saw when inspecting the exact webpage. It appears that there is some JavaScript code present on the page which dynamica ...

Incorporating an external JSX file into an HTML page in a React project

I have a React code in my js/script.js file. My HTML page's head tag is structured like this: <head> <script src="https://unpkg.com/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="06746367657246373328302834" ...

Elements with inline-block display not aligning horizontally next to each other

I am puzzled as to why the two sections, section.structure and section.specificity, are not aligning properly. It seems that when I reduce the width, they line up correctly at a certain point which I haven't identified yet. My goal is to have the wid ...

After receiving a response from an Ajax call, the forms are reloaded

Experimenting with servlet calls through Ajax functionality using a simple program. A form consisting of a text box and a div with some text. The program takes input from the user, replaces the text inside the div tag. The form looks like this: <form& ...

Collapsed Grid System

Is it possible to create a CSS grid system that meets the following requirements: The grid should have arbitrary height (with consistent width) and when a grid overflows, it should stack vertically underneath the preceding grid, regardless of other grid ...

What is the best solution for adjusting spacing in justified text columns within bootstrap?

As I work on creating a div with two columns, I am facing an issue with maintaining justified alignment. It looks great with two divs using col-lg6- in Bootstrap, but when I switch to col-md-6 or col-sm-6, there are excessive spaces between words to keep t ...

Jumping transitions in thumbnail images

Could you please visit I've noticed that when hovering over the thumbnails in the last column, the images jump a bit after transition, especially in Firefox. Do you have any suggestions on how to resolve this issue? ...

What is the best way to give this CSS button a "highlight" effect when it is clicked using either CSS3 or JavaScript?

In the HTML page, I have two buttons implemented with the following code: <!-- Button for WIFI projects: --> <a title="WIFI" href="javascript: void(0)" id="showWifi_${item.index}" class="showWifi"> <div class="news_box news_box_01 hvr-u ...