Solved

css links IE vs Firefox...

Posted on 2006-06-29
6
322 Views
Last Modified: 2006-11-18
2 part question for the following code.

webpage piece:
<ul class="oTriList">
          <li><a href="cat_1421.jsp" class="newsLinks">EXCITING NEWS: gIDE is NOW an ADA CERP Recognized Provider</a></li>
</ul>

linked css piece:  
a.loginout:visited { font-family: Verdana, Arial, Helvetica, sans-serif, Tahoma; font-size:10pt; color: #f3901d; font-weight: bold; cursor: pointer; text-decoration: none;}
a.newsLinks:hover { font-family: Verdana, Arial, Helvetica, sans-serif, Tahoma; font-size:7pt; color: #666666; font-weight: bold; cursor: pointer; text-decoration:underline;}
a.newsLinks:link {  font-family: Verdana, Arial, Helvetica, sans-serif, Tahoma; font-size:7pt; color: #4e8abe; font-weight: bold; cursor: pointer; text-decoration: none;}
ul.oTriList li { list-style-type: none; margin-left: -30px; padding-left:10px; background-image: url(http://216.150.213.182/servlet/ImageServer/anonymous_hotdesk_4/@gide/arr_o_small.gif); background-repeat: no-repeat; background-position: 0% 50%;}

the page can be viewed at www.gide.htsp.com

First,
The hover for the link doesn't work in Firefox but it works in IE.  However, hover doesn't work at all in either IE or Firefox  if the link has been visited.  Can I make the hover work in Firefox and once it's been visited in both IE & Firefox.

Second,
Is there anyway with css to make my triangle bullet be centered to the first line of the text (the text wraps) instead of it being centered to both lines or do I need to put the bullet and the text in a table aligned properly?
0
Comment
Question by:one2goofy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 30

Assisted Solution

by:GrandSchtroumpf
GrandSchtroumpf earned 500 total points
ID: 17013670
for part 1, change the order to this:

a.newsLinks:link { ... }
a.loginout:visited { ... }
a.newsLinks:hover { ... }

All these selectors have the same specificty, so it's the last one that will override the others in case of conflicts.

for part 2, it cannot be done in a simple way...  i'll see if i can come up with something though.
0
 
LVL 30

Expert Comment

by:GrandSchtroumpf
ID: 17013689
oops, i copied the error from your post... should have been:

a.newsLinks:link { ... }
a.newsLinks:visited { ... }
a.newsLinks:hover { ... }
0
 

Author Comment

by:one2goofy
ID: 17013694
right - that is what I meant to post
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 30

Accepted Solution

by:
GrandSchtroumpf earned 500 total points
ID: 17013865
ul.oTriList li {
  list-style-type: none;
  margin-left: -30px;
  padding-left: 10px;
  background-image: url(http://216.150.213.182/servlet/ImageServer/anonymous_hotdesk_4/@gide/arr_o_small.gif);
  background-repeat: no-repeat;
  background-position: 0 .6em;
  padding-top: 5px;
  line-height: 1.2em;
}

The idea is to shift the text down half the height of the background image and shift the background down half the line-height:

  padding-top: 5px;    -> 5px = half the height of the image
  background-position: 0 .6em;    -> .6em = half the line-height
0
 

Author Comment

by:one2goofy
ID: 17013930
Works great!  Thanks!
0
 
LVL 30

Expert Comment

by:GrandSchtroumpf
ID: 17014126
it works fine in firefox, but you set your font-size in "px" in IE, so it looks strange when you change the text-size.
it's better to use percentage values or "em" values for the font-size.
:)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
Suggested Courses

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question