August 2nd, 2001, 03:42 PM
Another CSS Question
In the top of my document, using PHP, I included a php file that contains a style sheet.
The style sheet is the following:
This should make all of my links white with no underlines, the visited ones are white with no underlines, and when the cursor hovers over the link it should be red and underlined.
This works great. My problem is, there is an area of the website that has a white background. This poses a problem if there is a hyperlink on the page, because it would be impossible to see the white hyperlink on a white background.
To get around this problem, I have added this declaration to any link on that white background:
<p style=font-size: 10pt; color: black>
This too, works great, except that because it is a <p> break, it moved my link down to the next line, which is annoying.
This is my sample <a href=link.htm><p style=font-size: 7pt; color: black>link</p></a>
Gives the result:
This is my sample
I would much rather it all be on the same line. Do you follow? Is that confusing enough?
August 2nd, 2001, 03:50 PM
Create a new style definition, either of the following would do:
The following class can be applied to any element:
This one can only be applied to <a> elements:
Then assign the class to your <a> tags:
Another alternative would be to use <span> tags rather than <p> tags.
Yet another alternative would be to add the inline style def. to your <a> tag rather than a <p> tag:
<a href="#" style="color:#000000;text-decoration:none;">.....</a>
Whatever you do, check it across different browsers and platforms as compliance with the css specification is sketchy.
August 2nd, 2001, 03:59 PM
But classes wont work for NS, or am I wrong?
August 2nd, 2001, 04:16 PM