删除Div中的HREF继承

时间:2015-01-08 05:47:54

标签: html

我正在尝试删除看似由嵌套div引起的href的继承。

我正在使用的外部CSS没有提到:href或任何东西,当我重新排序div以使href成为最后一个嵌套div时,它不会继承(因为它是最后一个)。 如果html中有一种方法可以删除继承,我可以请电话给我,因为我需要按此顺序。 感谢

  <div id = "logo">
     <a href="index.php"><img src="./images/logo.jpg" alt="logo image">
  </div>

  <div id = "scrolltext">
     <marquee behavior="scroll" direction="left">Here is some scrolling text... right to left!</marquee>
  </div>

1 个答案:

答案 0 :(得分:1)

将您的代码更改为:

<div id = "logo">
     <a href="index.php"><img src="./images/logo.jpg" title="logo image"> Link </a>
  </div>

  <div id = "scrolltext">
     <marquee behavior="scroll" direction="left">Here is some scrolling text... right to left!</marquee>
  </div>