2011-01-19 18 views
0

リンク(ウェブサイト)を開くボタンを作っていますが、問題はクロムでしか問題ないということです!なぜ??あなたは私がに行くしようとしているリンクイムにボタンに使用発電機からのリンクを見つけることができ、ここで link here!リンクhrefはクロムでしか動作しません

単純なHTMLコード>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
    <head> 
<title>HTML and CSS Rounded Corner Button Generated By iWebToolsOnline.com</title> 
<link href="./style.css" rel="stylesheet" type="text/css" /> 
<style href>a {text-decoration: none} </style> 
</head> 
    <body> 
<h3>&nbsp;</h3> 
<button class="rounded"> 
    <a href="http://www.iwebtoolsonline.com/rss-feed-icon-generator"> 
    <span>Save</span> 
    </a> 
</button> 
<br/><br/> 

</body> 
    </html> 

CSS

button { 
border: 0 none; 
cursor: pointer; 
font-weight: bold; 
padding: 0 15px 0 0; 
text-align: center; 
height: 40px; 
line-height: 40px; 
width: auto; 
} 

button.rounded { 
background: transparent url(btn_right.png) no-repeat scroll right top; 
clear: left; 
font-family: "Kristen ITC"; 
font-size: 36px; 

    } 

    button span { 
    display: block; 
    padding: 0 0 0 15px; 
    position: relative; 
    white-space: nowrap; 
    height: 40px; 
    line-height: 40px; 
    } 

    button.rounded span { 
    background: transparent url(btn_left.png) no-repeat scroll left top; 
    color: #FFFFFF; 
    } 

    button.rounded:hover { 
    background-position: 100% -40px; 
    } 

    button.rounded:hover span { 
    background-position: 0% -40px; 
    } 

    button::-moz-focus-inner { 
    border: none; 
    } 

、私はちょうどボタンでhrefを使用したので、私はこれが正しく行われていないのですか? 他に何が問題になる可能性がありますか?

ありがとうございます!

<a href="http://www.iwebtoolsonline.com/rss-feed-icon-generator"> 
    <button class="rounded">Save</button> 
    </a> 

しかし、この文句を言わないIE6での仕事や7(あなたはJS(jQueryの例)でそれをエミュレートする必要があります)::Firefoxで

$("a button").click(function() { 
    window.location.href = $(this).parent().attr("href"); 
}); 

しかし、まだ

+1

おそらく、AタグをBUTTONタグの外に置いてみてください。 – wmorrell

答えて

0

はこのようにそれを実行します。それはそのページの2倍を呼ぶでしょう(多分あなたにとって重要ではないでしょう)。そのことに関するバグレポート(https://bugzilla.mozilla.org/show_bug.cgi?id=577035)があります。

「A」内に「BUTTON」を表示するのは、W3C標準の推奨事項ではないことを覚えておいてください。

関連する問題