473,396 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How i can replace icon with text when i resize browser

when i add address on website make it responsive i want to text to be resized in icon how can i do it with css
Aug 11 '14 #1
3 1711
Exequiel
288 256MB
you can hide the text or set display:none; on the text element that you want to to change by icon, and show the icon using ur css code, set display:block; to the icon, but the icon must be in a display:none; in your css.
Aug 11 '14 #2
Exequiel
288 256MB
You can try this code. :)
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Zick Sample</title>
  6. <style>
  7. img.icon{display:block; width:55px; height:55px;}
  8. p{display:none;}
  9. @media only screen and (max-width: 600px) {
  10.     img.icon{display:none;}
  11.     p{display:block;}
  12. }
  13.  
  14. </style>
  15. </head>
  16.  
  17. <body>
  18.     <img src="GCC new logo - Copy.bmp" class="icon"/>
  19.     <p>Text</p>
  20. </body>
  21. </html>
  22.  
  23. </html>
Aug 12 '14 #3
Exequiel
288 256MB
goodluck, I hope it helps. :)
Aug 12 '14 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Matt | last post by:
I posted a question before regarding the offset positions when I used CSS. Some people suggested I should use percentage instead of pixels? I tried many different ways, but the position still...
2
by: rams.kakara | last post by:
hi, My page have background image,on that image have more images and text. My problem is whenever resize browser that images are not resized and also not moved correct place .(i.e look not like...
4
by: _B | last post by:
Is there any way to 'scrape' the ascii text from an AxSHDocView:AxWebBrowser control? IOW, I'd like to get the text as it is displayed by the browser. Somewhat like selecting all text in IE and...
3
by: jmbernz | last post by:
I really need help with this one, I'm trying to set the app icon during run time. There is no problem when the app is not group together, it still have the set icon but when group together if you...
4
by: alexvorn2 | last post by:
Hi! I use VB 2008 and I want to ask you how I can replace the text that is between "*" and "*" in a text file? If text file contains this: *dog* *cat* *bird* *lion* *something* .....end of...
5
by: JX | last post by:
Is it possible to replace the address in client browser for server.transfer with the the real location?
3
by: Gouri.Mahajan7 | last post by:
Hello, I am new to asp.net. Can anybody please tell me which event is fired when we close the browser. I want to remove some resources when the browser close button is pressed. Thanks in advance....
2
by: King of the R.O.U.S.'s | last post by:
Hi All How do I replace selected text in a textarea with JavaScript? I have a text area that the user can select what they want then press a button that will pick up the selected text, make...
7
by: Bram2 | last post by:
Sorry if this sounds like a dumbass newbie question. I'm getting crazy or something, but somehow I can't get this simple thing to work: 1. In general, how do I center text and/or images...
3
vdraceil
by: vdraceil | last post by:
Does anyone know hw to set the background icon text color(in win XP) to transparent?? I accidently changed it to some color and now it is possible to change to any other color,but not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.