CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 2nd, 2001, 03:42 PM
calebdzahnd calebdzahnd is offline
Just Another Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: Middle America
Posts: 41 calebdzahnd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 m 17 sec
Reputation Power: 7
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:

<style type="text/css">
a:link {text-decoration:none;color:#ffffff;}
a:visited {text-decoration:none;color:#ffffff;}
a:hover {text-decoration:underline;color:#ff0000;}
</style>

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.

Example:

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
link

I would much rather it all be on the same line. Do you follow? Is that confusing enough?

Any help?

Reply With Quote
  #2  
Old August 2nd, 2001, 03:50 PM
szarecor szarecor is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: New York
Posts: 122 szarecor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Create a new style definition, either of the following would do:

The following class can be applied to any element:
.special {color:#000000;text-decoration:none;}
This one can only be applied to <a> elements:
a.special {color:#000000;text-decoration:none;}

Then assign the class to your <a> tags:

<a class="special">....</a>


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.

Reply With Quote
  #3  
Old August 2nd, 2001, 03:59 PM
Ricochet's Avatar
Ricochet Ricochet is offline
CORNHOLIO!
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Posts: 51 Ricochet User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 26 m 16 sec
Reputation Power: 8
UHH

But classes wont work for NS, or am I wrong?

Reply With Quote
  #4  
Old August 2nd, 2001, 04:16 PM
szarecor szarecor is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: New York
Posts: 122 szarecor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Classes work in netscape, unless you're talking about some 3.x version. Granted, they sometimes behave oddly, but they work.

Check out http://www.webreview.com/style/css1...astergrid.shtml for support details.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Another CSS Question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway