Forum Moderators: not2easy

Message Too Old, No Replies

Fix column of elements

         

slipkid

11:24 pm on Aug 12, 2014 (gmt 0)

10+ Year Member



I am updating an old web page that uses inline styling. I have a column of links on the left side of the page, constrained by a div container to 25% of the page. Using css styling for the a href links, the clickable portion of the text in the links runs together to the limit of the div container. I can fix this so that each link falls on each own line by using the good ol' (br> command but I have read that this is not preferred code. What I have found to work is to place each link within its own div container.

This method displays properly on the latest Firefox browser, but testing it on Win XP running IE8 the test shrinks from 1em (16px) to .68em (13px). Is there something I can do in my css code to fix this problem on IE8? Here is the code I am using.

a:active {
color: color: #00FF00;
text-align: left;
font-family: Verdana, Geneva, sans-serif;
font-size: 1em;
}



<div>
<a class="a.active"><a href="file-1.html">file 1</a>
</div>
<div>
<a class="a.active"><a href="file-2.html">file 2</a>

</div>

and so on...

not2easy

12:51 am on Aug 13, 2014 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



A style tag in the header? I am not positive on this format, this is out of antiquity y'know, but best guess is something like:
<!--[if IE 8]><style> font-size { zoom: 1;} </style><![endif]-->

slipkid

4:10 am on Aug 13, 2014 (gmt 0)

10+ Year Member



Thanks not2easy

I tried the code and it did not make a difference.

I will continue working with my css. Maybe I have an error somewhere in the css or page code I have missed.

tangor

5:12 am on Aug 13, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Is there a reason you're not using ul,li for your nav links? Each li is discrete and you wouldn't need all those extra divs...

rainborick

2:43 pm on Aug 13, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



There are some problems in the code you posted.

Try:


a.activeNav {
color: #00FF00;
text-align: left;
font-family: Verdana, Geneva, sans-serif;
font-size: 1em;
}



<div>
<a class="activeNav"><a href="file-1.html">file 1</a>
</div>
<div>
<a class="activeNav"><a href="file-2.html">file 2</a>
</div>


I suggest you avoid the use of CSS property names for class and id names. It just makes it too easy for you to overlook problems because everything looks OK at first glance.

slipkid

3:48 pm on Aug 13, 2014 (gmt 0)

10+ Year Member



Tangor:

Thanks for your suggestion. Fixed my problem. Elegant solution.

slipkid

3:50 pm on Aug 13, 2014 (gmt 0)

10+ Year Member



Rainborick:

Have made note of your suggestion. Thanks.