简体   繁体   中英

how can I realize something like this in CSS ans HTML?

how can I realize something like this in CSS ans HTML ?

 <bod>     
 <div id="corner">    
 <div id"link_img"></div>  
 <div id "link_text">LINK</div> 
 <div> 
 <bod>

http://img7.imageshack.us/my.php?image=linke.jpg

Something like this (if you can't change the tags but can add an &nbsp; in

 <div id="corner">    
     <div id="link_img">&nbsp;</div>  
     <div id="link_text">LINK</div> 
 <div> 

<style type="text/css">

#link_img {float: left; width: 20px; background-color: #ffff00; margin-right: 5px;}
#link_text {float: left; color: #ffff00;}

</style>

If you can't add the &nbsp; you'll need height: 20px; on #link_img

Alternatively something like this:

<div id="link_text">LINK</div> 

<style type="text/css">

#link_text {color: #ffff00; border-left: 20px solid #ffff00; padding-left: 5px;}

</style>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM