Why is the new google logo not in CSS? [closed] - css

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
So, I'm learning CSS and came to know that you can create simple images by using CSS. The new google logo is entirely composed of circles and rectangles, so that its size is much lesser than the old one, which is in line with their mission to get google in underdeveloped countries, with slower internet. My question is, won't using CSS for logo be much smaller in size than using an image

According to Google's description of the process they went through redesigning their logo, there's a variant of the image that's only 305 bytes. So they wouldn't gain much by converting it to CSS.

As always there are multiple ways to solve a problem. Trying to recreate the logo in css is one of them but that's not what CSS is for.
There are multiple ways Google could show their logo:
As an image: png, jpg, svg
As a seperate file
Embedded in the html or css document
As a font
As you propose, recreate in html and css
Each of these solutions have their benefits and drawbacks. You only mentioned one benefit but their are so many other things you need to check: performance, platforms, accessibility, ...
In general you will notice that just displaying an image gives the best result.

Related

Which approach is preferable for creating a grid - flexbox, css-table or inline-block? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
Which approach is preferable for creating a grid - flexbox, css-table or inline-block?
Or may be each of this technics should be used in specified cases?
If so, in what cases should be they used?
each has benefits and disadvantages.
Flexbox is very useful in many cases, but some browsers still lacks the features.
Tables may sound oldskool, but if you are coding an html mailing, it is still the best way.
I think before starting a project, you should check other projects and search on google what is best for you scope.
Flexbox is becoming the most popular among web developers these days. Websites have been able to get much more responsive on different screen sizes over the last few years which is why using flexboxes is the most popular at this point. It is finally supported on all of the main browsers and provides a good interface for building anything.
Using inline-blocks is still useful however, in different parts of a website, usually with less elements or only two columns, such as a image or an icon next to a body of text.

What is best practice for fluid designs - using css sprites or inline images? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am working on a web site which is supposed to have a fluid layout. I am currently presented with a dilemma: shall I use css sprite or opt for inline images?
All images will need to be fluid and reduce/enlarge their size on each respective screen size. I was thinking to use CSS sprite image but that would mean that I need to identify all major screen widths and then slice all images with those respective widths and add them to my sprite...
My questions is: what is the best approach for rendering images in fluid / responsive designs? Sprites, inline images or combination of both?
Thank you!
Personally I think sprites are a little unnecessary, the internet is fast enough now to just use separate bg images. Displaying the correct image by using media queries and constraining the size in fluid designs by using background-size: cover; or contain.

Logo image in <div> or not in <div> - pros and cons? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm using src img to place a logo in the header section. What would the pros and cons be of placing the image in a < div > vs leaving it as a plain ol' img src?
I'm thinking that, for the most part, I should be able to apply the same properties (such as margin, class, ID, etc.) to both. Am I missing something?
Note: I'm not interested in a background-image since I consider the logo content.
tl;dr wrapping is always good thing, if you are going to maintain that code for long enough time.
because you can created very targeted css, show, hide could be easier, round corners and adding text for accessibility will be easier etc..

CSS: Div with background image OR Image tag [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
From my knowledge, there are 2 primary ways to insert images into HTMl.
You can either use the traditional image tag and add the image via the "src" attribute.
Or you can add the image as a background-image to a div tag via the background-image property.
Can someone explain some of the pros and cons of using either of these approaches? When would you use one or the other?
If your images are for designing reasons, your best of placing them as background. But when your images are part of your content, for example your website logo, or some illustration as an explanation to your text, you put it in with an img tag.
I would say use css to insert background images. From my experience it's more efficient and easier to read if you can keep all attributes of a div in one language. You can then edit them without switching screens in your editor, unless you plan to add some kind of user interface (javascript, jquery, etc.)

How to make this shape with css? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Please check out this image:
Look at the part that says 'keyboard'
I want that shape but facing the other way (right) and not curved.
I know this is a pentagon but its not the standard type so its hard to find the name or type of this shape to learn how to make it in css. Any ideas on how to make it!?!?
Thanks guys,
James
It's a rounded rectangle and a triangle (or a rotated square). To make it in "CSS" would require some hacks. I suggest you use a background image.
Mimicking the iPhone design purely in CSS is nearly impossible. However:
I found iWebKit, written by a guy who spent a lot of time on just that task. He did the navigation buttons with border images.
You can take a look at it at http://snippetspace.com/ . It's free to download, I think.
Looking at the demo code, you can easily see how the buttons work.
iWebKit is only for webkit browsers, but it does not take a lot of work to adapt to other browsers (just add -moz or -o lines where it says -webkit in the CSS).

Resources