Solved

css links IE vs Firefox...

Posted on 2006-06-29
6
317 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Why is this panel heading creating extra space 2 51
Remove lines by logo 2 30
Crazy text will not be removed no matter what I try! 13 30
Center div containing a script 6 17
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... …
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…

810 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