css - 标题中的可点击图像

标签 css hyperlink header styles clickable

我一直在尝试将可点击的图像插入到标题中以位于右下角。我一直在搜索您过去的问题,并且通过浏览已发布的内容已经走到了这一步。但是,我可以在没有正确链接的情况下获得使用此代码的样式:

header {

 <style> 
 div#button 
     {
     position:relative;
    align:right;
    top:111px;left:640px; margin:0;width:100%;
    padding-bottom:25px;
   }

</style> 

***position is right, but linkage is wrong***
<div id="button">
  <a href="0379a5a.netsolhost.com/wordpress1/products/products-page/" >  
<img src="http://0379a5a.netsolhost.com/wordpress1/wp-content/uploads/2013/07/shop_now2.png" height="80.5x" width="163.5px" 
<div style="float:right;margin-top: 111px; margin-right: 50px; padding-bottom:16px;"

/></a>
</div>

但是链接不起作用。我可以获得工作链接,但随后样式随此代码消失:

 <style> 
 div#shop_now_button 
     {
     position: relative;
    float: right;
    margin-top: 111px;
    margin-left: 640px; 
    margin-right: 50px;

    width:100%;
    padding-bottom:25px;
   }

</style> 


<div id="shop_now_button">
<div style="float:right;margin-top: 111px; margin-right: 50px; padding-bottom:16px;">   
<a s href="http://0379a5a.netsolhost.com/wordpress1/product/products-page/" target="_blank"> 
<img src="http://0379a5a.netsolhost.com/wordpress1/wp- content/uploads/2013/07/shop_now2.png" 
 height="80.5px" 
  width="163.5px"  
 float="right" 
 margin-top="111px" 
 margin-right="50px" 
 padding-bottom="16px" /> 
  </div>

我只是希望我知道发生了什么。几个小时以来我一直在解决问题...(如果它是一个简单的解决方案,我深表歉意——我是新手)这是我的虚荣域... http://0379a5a.netsolhost.com/wordpress1/

最佳答案

使用:

.header {position: relative;}
.header img {positon: absolute; bottom: 0; right: 0;}

关于css - 标题中的可点击图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17684538/

相关文章:

jquery - 在选择列表之前插入标签

SwiftUI 文本 - 如何创建超链接并在字符串中为网络链接下划线

javascript - jQuery 链接淡入淡出。帮助!

php - jQuery ajax 回到 $_POST 而不是 REQUEST 负载

c++ - 视觉 C++ : Cannot open include file

c - 编译引用同一个头文件的两个C文件报错 'duplicate definition'

html - 为输入类型 ="file"按钮设置样式

html - `Position: relative` 被忽略了吗?

html - 当显示一个只有一个单元格的简单表格时,该表格显示的大小大约是它应该显示的两倍

ios - TextView 中的网页链接