answersLogoWhite

0


Best Answer

There are two ways to render an image on an HTML page using CSS.

The first, and easiest is to use the background-image property.

Example: I could render the WikiAnswers logo image on a page with this CSS code:

div{ background-image: url(http://site1.wikianswers.com/templates/images/logo.png%29;}

The second also uses the background-image property, but instead of writing the URL of the image, you use a "data: URI." You can generate a data: URI here:http://www.scalora.org/projects/uriencoder/

Using a data:URI, i could render the WikiAnswers logo image on a page like this:

div{background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbgAAAAvCAMAAACmAC

/OAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2

VSZWFkeXHJZTwAAADMUExURZzNRNvtu8DfiIigz7vJ5IHAEURptPb67u7x+IrEIq7W

ZsnkmeTxzBFBoN3k8e323czW65mt1iJOp7fbdzNcrZPJM9LoqqXSVXeSyVV3u2aFw

qq73X58fvn5+f78/359f/j18uvp7M/Kyf/8/359fuvp65WPhrSytNHS0fLv8vj4+NHR0OT

j5d7f3q2urbS1tOXl5dfY17W1tPLw8318fvHv8uTi5MLAwtDKyfn5/8G/wsnKyezp

7JWQh/Ly8uXm7MjEyXi7AAAzmf///9GJkl8AAAoCSURBVHja7JsHk9y2FYBJsHdy2ba

cJNtxmp3ETu9xSPz//xR0PADk3p1XE9/NECOdliQA6t6HV4H18NHeZfMOERzgjvZ

ewRWoeO2QujsY/MTgpjxaluV15NLrul4PCI+AI8ri6zbRW8iHdxCnI68Ron2SAvl8fE

+pkYY236L7Ga2r1nWNDwiPgPMWo9Fb5p3Ft7qRkclI/s2N8f0mN93PMJMrbdUB4R

FwvQHJc1hmXsO6jfJGhGSPkj5o8jsaB/rBdmXg1vSg8IiPS3KJZG6cWxBHM7M7CXlu

PES74JJtpmnFwYUHhceCkxHaRMOAjmbsKCH4BhB/F5y/Da7j3NbgoPAYON9VL

x+4PNV6YUqlF2yeA2f2U+0iwF0OCg+mAxv6lS2ue8qUUvYwHLkDrt8KW1LB7YhO

HgZXLI5qI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6SckKfZhFRUESVVICbRpY9KXA9YVYsETHK9G8jxzHqkbJ627Y

4h5veikSz7QuNkGY24pvIt/vxsG3oaiccoCrR6vyAb0rLUymBlPU5lSMCbKcUJxjsAMm

nA+Q2pMC8VmELDPT25A44svbJH35MsaEORCdO0MeRvvSvRzXGk5Z0bpY8W5qc

dhPgRu6UFDhyqyTPl7yhWpcgtrmJKL1+0lZvG9xkh/6JG5oUHvyOSG/uesvQkjyC/doT3LKGVk75uW4APUD/UAqbb1FbYd8VSLt1fBQkx7fTO/AfgdHn5uT89x+FD0tK+s2

JkagEFT6yzu1vgvNkpI+WCC1FvxAHWCpwUcRkrQOaaEFRlpAIlqoBedGM2Kz5EuV

atXein8yqSlIVQpvbCCL8HHXRhP+mMqdoYL90tcFhu4qo9e+kIkJ6wTQjlFY1tvKsFv

rIwc3DxGmSdbiZ27Vq5nuTC2IFc1IelTV3XrSem9FgZNTL3AI3CaSNcpURJc9VVJpKX

gLW4AghAmgmvVjwMolZJ8Pq7YArPCvX9r05sbYR1Jcc6WRNI5LREiamNDc1+t3CkI

q31Wep9NGrMKQPU1FP5h1Yb1zrk1d1FwTBza1IBfFFGb1bfHFFT88VaQMt3qL+vT

+5iJTHkbttsqo95LEFW/JQO1ImjHxCuQZHFSZHfYZ0rOCxCXqYx810DWhwE9Pggn

mrUrwLcW3y8DPgjuaQYxY/b+RHwofIMeehQK4MVCGiSgmOW56o0DUoxH76EFxC

w0oNjoeUCcdEfRAfZZ4hP8C9uBGjT2JF/jVOfzdrTrgFMm6UD73WT7AONw9wP0aEk

XNY7f/aIhgwHuBeYy5zz8t/srf7qh59gHvH7QB3gDvaAe5oz7b/CTAA4Q6ARHHyf18A

AAAASUVORK5CYII=);}

It looks like random characters, but the web browser will parse it and display an image.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you get the CSS code of the picture?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the css code for posting a picture?

A picture (other than the background) is done in HTML. Borders and the like are controlled with CSS.


What is the HTML code to add a border to a picture?

For example this is the HTML code: <body> <div id="picture"> <img src="images/image.jpg" alt="this is image" /> </div> </body> In CSS: #picture img { border:2px solid #000066; }


On MagiStream what is a Custom CSS code and how do you use it?

A CSS code allows you to modify your profile visually. There are articles in the MagiStream gamer forums that explain how and where you can use CSS codes.


Css code ul class?

to modify any HTML tag just type the tag as the css property eg. ul { /*your css here*/ }


How do you hide default picture?

For 1.0: This code will hide ONLY your default picture: <style type "text/css"> table.profileinfo table tr td a img { display: none; } </style> This code will hide EVERYTHING on your main profile info (Age, sex, location, headline, picture, etc.) <style> .profileinfo {display: none;} </style> For 2.0: (Put in Customize --> CSS/HTML section.) div.basicInfoModule div.photo {display:none;} I hope I helped! <3


Is Source Code the same as CSS Code?

It can be but source code is just the code of a webpage. Whatever format it is.


What are the importants of css in HTML?

CSS provides styling to the code for interactiveness. It makes the webpage look good and classy.


What is CSS in Dreamweaver?

CSS (Cascading Style Sheet) is an alternative way to style a web page. Using CSS makes the page load faster because the CSS code is in an external file not in the actual HTML document.


What is an embedded style?

Embedded CSS simply means that your CSS is written in an external file (i.e. not in your HTML file). The external file can be anywhere on your server and must end in ".css". You would call this CSS file from inside your HTML file like this:On the otherhand, inline CSS is when your CSS is included inside of your HTML code, for example:foo


How do you override css?

If you are using an External style sheet, CSS can be changed by embedding CSS code into the HEAD tag after the link to the external CSS file.Embedded CSS must be contained within a STYLE tag.EXAMPLE:


Is there a list of cheat sheets for HTML and css code?

w3schools has very handy guides and references to CSS and HTML, and more. [ http://www.w3schools.com/ ]


How do you put a cursor on a facebook page?

Facebook has not CSS program, and usually if you wanna put the cursor, you have to copy and paste "the code" in the CSS box.