hi, i have a hyperlink with a background-image on it so that a differerent image can be displayed dependant on the css. it works fine in IE but will not display in firefox, is there a way to fix this, other than that, is it possible to open a new window from an asp button and redirect to a certain page
?
help please!You will need to apply a display: block; to the hyperlink element in the style sheet.
Hope that helps.Actually, CSS1 says that background-image applies to all elements and the following works fine in IE6 and Fx15.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Content-Script-Type" content="text/javascript">
<meta name="Content-Style-Type" content="text/css">
<title>Untitled</title>
<style type="text/css">
a { background: #aaa url(<!-- m --><a class="postlink" href="http://www.webdeveloper.com/icom_includes/footers/icom_foot.gif">http://www.webdeveloper.com/icom_includ ... m_foot.gif</a><!-- m -->) }
</style>
</head>
<body>
<p>
Lorem ipsum dolor sit amet, <a href=http://www.webdeveloper.com/forum/archive/index.php/"#">consectetuer adipiscing elit</a>.
Sed metus. Sed sapien nisl, facilisis ut, dictum ut, suscipit at, erat.
Curabitur nonummy. Morbi dignissim, tellus vitae lobortis hendrerit,
elit neque dictum sapien, non suscipit magna magna ultrices orci.
Nulla eu nisi sit amet libero tempor ornare. Phasellus sem quam,
ullamcorper sed, rutrum vel, semper vitae, quam. Etiam dapibus quam
a libero. Donec sit amet ipsum vitae metus dignissim tincidunt.
Fusce lacus dolor, fermentum sit amet, sollicitudin et, sagittis
auctor, nisl. Aenean imperdiet. Lorem ipsum dolor sit amet,
consectetuer adipiscing elit. Praesent orci. Pellentesque metus odio,
pulvinar nec, dignissim dapibus, lobortis et, nisi. Vestibulum id
nulla. Integer non eros sit amet elit gravida dapibus. Cras volutpat
pretium metus. Quisque ut enim. Morbi dolor lectus, vestibulum a,
interdum sit amet, scelerisque et, arcu. Suspendisse a nibh a lacus
rutrum accumsan.
</p>
</body>
</html>display:block worked thanks mate, you can always rely on somebody from this site helping out!
?
help please!You will need to apply a display: block; to the hyperlink element in the style sheet.
Hope that helps.Actually, CSS1 says that background-image applies to all elements and the following works fine in IE6 and Fx15.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Content-Script-Type" content="text/javascript">
<meta name="Content-Style-Type" content="text/css">
<title>Untitled</title>
<style type="text/css">
a { background: #aaa url(<!-- m --><a class="postlink" href="http://www.webdeveloper.com/icom_includes/footers/icom_foot.gif">http://www.webdeveloper.com/icom_includ ... m_foot.gif</a><!-- m -->) }
</style>
</head>
<body>
<p>
Lorem ipsum dolor sit amet, <a href=http://www.webdeveloper.com/forum/archive/index.php/"#">consectetuer adipiscing elit</a>.
Sed metus. Sed sapien nisl, facilisis ut, dictum ut, suscipit at, erat.
Curabitur nonummy. Morbi dignissim, tellus vitae lobortis hendrerit,
elit neque dictum sapien, non suscipit magna magna ultrices orci.
Nulla eu nisi sit amet libero tempor ornare. Phasellus sem quam,
ullamcorper sed, rutrum vel, semper vitae, quam. Etiam dapibus quam
a libero. Donec sit amet ipsum vitae metus dignissim tincidunt.
Fusce lacus dolor, fermentum sit amet, sollicitudin et, sagittis
auctor, nisl. Aenean imperdiet. Lorem ipsum dolor sit amet,
consectetuer adipiscing elit. Praesent orci. Pellentesque metus odio,
pulvinar nec, dignissim dapibus, lobortis et, nisi. Vestibulum id
nulla. Integer non eros sit amet elit gravida dapibus. Cras volutpat
pretium metus. Quisque ut enim. Morbi dolor lectus, vestibulum a,
interdum sit amet, scelerisque et, arcu. Suspendisse a nibh a lacus
rutrum accumsan.
</p>
</body>
</html>display:block worked thanks mate, you can always rely on somebody from this site helping out!