473,395 Members | 1,677 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Strange css problem (bug?)

Hi,

I'm developing a asp.net application and ran into a strange css problem.

I want all my links to have a dashed underline and when they are
hovered, it must change to a solid line. Sounds simple, but it's not
working.

I've cooked down my output code to show you what I mean. If you run the
code below, there's no line under the link, but if you either remove the
<!DOCTYPE...> line or the body-part of the css decleration, everything
works fine.

Here's my code (watch for wrappings):

----------------------------------------------------------------------

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Strange</title>
<style>
<!--
body
{
font-family: verdana, arial, helvetica, sans-serif;
}
a:link, a:visited
{
font-family: verdana, arial, helvetica, sans-serif;
color: #d32525;
border-bottom: 1px dashed #d32525;
text-decoration: none;
}

a:hover
{
font-family: verdana, arial, helvetica, sans-serif;
color: #d32525;
border-bottom: 1px solid #d32525;
text-decoration: none;
}
-->
</style>
</head>

<body>
<a href="http://www.microsoft.com/">This is just a link</a>
</body>

</html>

----------------------------------------------------------------------

Any idea???????

I also found out, if I put a <p>&nbsp;</p> below the <a href...> in the
code above, everything works fine.

I'm confused!!!!!

HHHHEEELLLPPPPP! :o)

Thank you in advance.

M O J O
Nov 19 '05 #1
7 979

Check out the css newsgroup

Let me know if you have any more questions...

Cheers,
Tom Pester
Hi,

I'm developing a asp.net application and ran into a strange css
problem.

I want all my links to have a dashed underline and when they are
hovered, it must change to a solid line. Sounds simple, but it's not
working.

I've cooked down my output code to show you what I mean. If you run
the code below, there's no line under the link, but if you either
remove the <!DOCTYPE...> line or the body-part of the css decleration,
everything works fine.

Here's my code (watch for wrappings):

----------------------------------------------------------------------

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>Strange</title>
<style>
<!--
body
{
font-family: verdana, arial, helvetica, sans-serif;
}
a:link, a:visited
{
font-family: verdana, arial, helvetica, sans-serif;
color: #d32525;
border-bottom: 1px dashed #d32525;
text-decoration: none;
}
a:hover
{
font-family: verdana, arial, helvetica, sans-serif;
color: #d32525;
border-bottom: 1px solid #d32525;
text-decoration: none;
}
-->
</style>
</head>
<body>
<a href="http://www.microsoft.com/">This is just a link</a>
</body>
</html>

----------------------------------------------------------------------

Any idea???????

I also found out, if I put a <p>&nbsp;</p> below the <a href...> in
the code above, everything works fine.

I'm confused!!!!!

HHHHEEELLLPPPPP! :o)

Thank you in advance.

M O J O

Nov 19 '05 #2
Hi Tom,

Which group are you exactly talking about?

M O J O

tom pester wrote:

Check out the css newsgroup

Let me know if you have any more questions...

Cheers,
Tom Pester
Hi,

I'm developing a asp.net application and ran into a strange css
problem.

I want all my links to have a dashed underline and when they are
hovered, it must change to a solid line. Sounds simple, but it's not
working.

I've cooked down my output code to show you what I mean. If you run
the code below, there's no line under the link, but if you either
remove the <!DOCTYPE...> line or the body-part of the css decleration,
everything works fine.

Here's my code (watch for wrappings):

----------------------------------------------------------------------

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>Strange</title>
<style>
<!--
body
{
font-family: verdana, arial, helvetica, sans-serif;
}
a:link, a:visited
{
font-family: verdana, arial, helvetica, sans-serif;
color: #d32525;
border-bottom: 1px dashed #d32525;
text-decoration: none;
}
a:hover
{
font-family: verdana, arial, helvetica, sans-serif;
color: #d32525;
border-bottom: 1px solid #d32525;
text-decoration: none;
}
-->
</style>
</head>
<body>
<a href="http://www.microsoft.com/">This is just a link</a>
</body>
</html>

----------------------------------------------------------------------

Any idea???????

I also found out, if I put a <p>&nbsp;</p> below the <a href...> in
the code above, everything works fine.

I'm confused!!!!!

HHHHEEELLLPPPPP! :o)

Thank you in advance.

M O J O


Nov 19 '05 #3
http://groups.google.com/group/comp....ts?gvc=2&hl=en

Let me know if it helped you or not...

Cheers,
Tom Pester
Hi Tom,

Which group are you exactly talking about?

M O J O

tom pester wrote:
Check out the css newsgroup

Let me know if you have any more questions...

Cheers,
Tom Pester
Hi,

I'm developing a asp.net application and ran into a strange css
problem.

I want all my links to have a dashed underline and when they are
hovered, it must change to a solid line. Sounds simple, but it's not
working.

I've cooked down my output code to show you what I mean. If you run
the code below, there's no line under the link, but if you either
remove the <!DOCTYPE...> line or the body-part of the css
decleration, everything works fine.

Here's my code (watch for wrappings):

--------------------------------------------------------------------
--

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>Strange</title>
<style>
<!--
body
{
font-family: verdana, arial, helvetica, sans-serif;
}
a:link, a:visited
{
font-family: verdana, arial, helvetica, sans-serif;
color: #d32525;
border-bottom: 1px dashed #d32525;
text-decoration: none;
}
a:hover
{
font-family: verdana, arial, helvetica, sans-serif;
color: #d32525;
border-bottom: 1px solid #d32525;
text-decoration: none;
}
-->
</style>
</head>
<body>
<a href="http://www.microsoft.com/">This is just a link</a>
</body>
</html>
--------------------------------------------------------------------
--

Any idea???????

I also found out, if I put a <p>&nbsp;</p> below the <a href...> in
the code above, everything works fine.

I'm confused!!!!!

HHHHEEELLLPPPPP! :o)

Thank you in advance.

M O J O

Nov 19 '05 #4
Try putting your style-block before the body tag. Inside the head you
should only refer to external css files.

Nov 19 '05 #5
Okay thanks, I'll give it a try.

M O J O

tom pester wrote:
http://groups.google.com/group/comp....ts?gvc=2&hl=en
Let me know if it helped you or not...

Cheers,
Tom Pester
Hi Tom,

Which group are you exactly talking about?

M O J O

tom pester wrote:
Check out the css newsgroup

Let me know if you have any more questions...

Cheers,
Tom Pester

Hi,

I'm developing a asp.net application and ran into a strange css
problem.

I want all my links to have a dashed underline and when they are
hovered, it must change to a solid line. Sounds simple, but it's not
working.

I've cooked down my output code to show you what I mean. If you run
the code below, there's no line under the link, but if you either
remove the <!DOCTYPE...> line or the body-part of the css
decleration, everything works fine.

Here's my code (watch for wrappings):

--------------------------------------------------------------------
--

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>Strange</title>
<style>
<!--
body
{
font-family: verdana, arial, helvetica, sans-serif;
}
a:link, a:visited
{
font-family: verdana, arial, helvetica, sans-serif;
color: #d32525;
border-bottom: 1px dashed #d32525;
text-decoration: none;
}
a:hover
{
font-family: verdana, arial, helvetica, sans-serif;
color: #d32525;
border-bottom: 1px solid #d32525;
text-decoration: none;
}
-->
</style>
</head>
<body>
<a href="http://www.microsoft.com/">This is just a link</a>
</body>
</html>
--------------------------------------------------------------------
--

Any idea???????

I also found out, if I put a <p>&nbsp;</p> below the <a href...> in
the code above, everything works fine.

I'm confused!!!!!

HHHHEEELLLPPPPP! :o)

Thank you in advance.

M O J O


Nov 19 '05 #6
Hi Stefan,

Thanks for letting me know. Unfortunately it does not solve my problem.

:o(

Hmmmmm.

Thanks anyway.

M O J O

Stefan wrote:
Try putting your style-block before the body tag. Inside the head you
should only refer to external css files.

Nov 19 '05 #7
your problem is that an <a> is an inline element, not a block element, so it
does not have a border. normally you use the text-decoration to control
underlining, but there is no dashed version. you can try setting the display
style to block.

-- bruce (sqlwork.com)

"M O J O" <mojo@_no_spam_delete_this_newwebsolutions.dk> wrote in message
news:uN*************@tk2msftngp13.phx.gbl...
Hi,

I'm developing a asp.net application and ran into a strange css problem.

I want all my links to have a dashed underline and when they are hovered,
it must change to a solid line. Sounds simple, but it's not working.

I've cooked down my output code to show you what I mean. If you run the
code below, there's no line under the link, but if you either remove the
<!DOCTYPE...> line or the body-part of the css decleration, everything
works fine.

Here's my code (watch for wrappings):

----------------------------------------------------------------------

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Strange</title>
<style>
<!--
body
{
font-family: verdana, arial, helvetica, sans-serif;
}
a:link, a:visited
{
font-family: verdana, arial, helvetica, sans-serif;
color: #d32525;
border-bottom: 1px dashed #d32525;
text-decoration: none;
}

a:hover
{
font-family: verdana, arial, helvetica, sans-serif;
color: #d32525;
border-bottom: 1px solid #d32525;
text-decoration: none;
}
-->
</style>
</head>

<body>
<a href="http://www.microsoft.com/">This is just a link</a>
</body>

</html>

----------------------------------------------------------------------

Any idea???????

I also found out, if I put a <p>&nbsp;</p> below the <a href...> in the
code above, everything works fine.

I'm confused!!!!!

HHHHEEELLLPPPPP! :o)

Thank you in advance.

M O J O

Nov 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: Markus Sandheide | last post by:
Hello! Execute these lines: int x = 1; x = x > 2345678901; You will get: x == 1 with Borland C++ Builder
7
by: M O J O | last post by:
Hi, I'm developing a asp.net application and ran into a strange css problem. I want all my links to have a dashed underline and when they are hovered, it must change to a solid line. Sounds...
5
by: Hatul Shilgy | last post by:
Hi I'm facing a very strange problem here. My code looks like this if(A == null return doSomethingWith(A.b) When I run my code (in debug mode), I get a NullReferenceException -- and on...
8
by: Spam Trap | last post by:
I am getting strange resizing problems when using an inherited form. Controls are moving themselves seemingly randomly, but reproducibly. "frmBase" is my base class (a windows form), and...
8
by: Dox33 | last post by:
I ran into a very strange behaviour of raw_input(). I hope somebody can tell me how to fix this. (Or is this a problem in the python source?) I will explain the problem by using 3 examples....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.