dongyi5425 2013-02-20 00:58
浏览 52

绝对位置从图像中删除超链接。

I've got the following code:

<div style="position: absolute; margin-top: 48px; margin-left: 261px;">
    <a href="http://www.somepage.com" target="_blank">
        <?php $image_url='http://www.somepage.com/image.jpg'; ?>
        <img src="<?php echo $image_url;?>">
    </a>
</div>

The image displays and positions correctly and the hyperlink works fine without the "position: absolute" but when it's included as above the link does not work.

I'm by no means a PHP programmer or even a programmer for that matter. So I'm probably missing something obvious here? any help would extremely appreciated.

  • 写回答

1条回答 默认 最新

  • donglin5770 2013-02-20 01:10
    关注

    Worken ---> It's working fine enough tried it on localhost also, there something else thats causing your problem

    code:

    <div style="position: absolute; margin-top: 48px; margin-left: 261px;">
        <a href="http://www.somepage.com" target="_blank">
            <img style = "border:1px solid black;" src="http://www.somepage.com/image.jpg">
        </a>
    </div>
    

    as a side note:i find it humorous that it links to an actual page

    EDIT:

    Glad to see you have figured it out a tad, heres another solution i just thought of:

    #logo{
        background-image:url(http://www.somepage.com/image.jpg);
        height:400px;
        width:40px;
    }
    
    <div style="position: absolute; margin-top: 48px; margin-left: 261px;">
        <a href="http://www.somepage.com" target="_blank" id = "logo">
        </a>
    </div>
    
    评论

报告相同问题?

悬赏问题

  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程