Solved

css links IE vs Firefox...

Posted on 2006-06-29
6
315 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
  • 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Flexbox in CSS3 2 39
Element alignment and word wrapping 9 61
Where to define breakpoints for responsive CSS 2 30
Put shading on half of picture 8 23
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

911 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now