When the browser's width is between from 700 to 1000px, we will preface each email link with the text "Email: ":
HTML file: | Displayed by browser: |
---|---|
<style>
ul { list-style-type: none; } ul li a { color: green; text-decoration: none; padding: 3px; display: block; } @media screen and (max-width: 699px) and (min-width: 520px) { ul li a { padding-left: 30px; background: url(../html_beg/images/email.png) left center no-repeat; } } @media screen and (max-width: 1000px) and (min-width: 700px) { ul li a:before { content: "Email: "; font-style: italic; color: #666666; } } </style> <body> <h1>Resize the browser window to see the effect!</h1> <ul> <li><a data-email="[email protected]" href="mailto:[email protected]">John Doe</a></li> <li><a data-email="[email protected]" href="mailto:[email protected]">Mary Moe</a></li> <li><a data-email="[email protected]" href="mailto:[email protected]">Amanda Panda</a></li> </ul> </body> |
Resize the browser window to see the effect! |