Solved

css links IE vs Firefox...

Posted on 2006-06-29
6
320 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

Suggested Solutions

Title # Comments Views Activity
Sort Order Icons on HTML Table 3 66
CSS style formatting? 2 37
Easy css question moving title underneath an image 4 30
How do I wrap text in dialog window 6 7
This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

730 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