color: inherit; issue with IE 7

This is a discussion on "color: inherit; issue with IE 7" within the Web Page Design section. This forum, and the thread "color: inherit; issue with IE 7 are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Oct 14th, 2007, 14:27
Reputable Member
Join Date: Jun 2007
Location: UK
Age: 29
Posts: 172
Thanks: 0
Thanked 0 Times in 0 Posts
color: inherit; issue with IE 7

hi

I am working on a site and I am trying to specify the colours of text links based on a particular class. The main body has a colour to define text and i also have this (cut down version)

Code: Select all
.panelText{
    position: absolute;
    margin-left:160px;
    margin-top:5px;
    position:absolute;
    font-family:Verdana, Arial, Helvetica, sans-serif;
    font-size:10px;
    width:180px;
    float:left;
}

.panelText a{
text-decoration:none;
color: inherit;
}

.panel001{
    background-image:url(../images/panels/001.gif);
    height: 103px;
    width: 361px;
    color:#FFFFFF;
}
.panel002{
    background-image:url(../images/panels/002.gif);
    height: 103px;
    width: 361px;
    color:#000000;
}
etc etc

The colour properly gets inherited in firefox, but in IE it colours it using the colour of the main body text. I can specify the colour for IE by adding

color: [what colour I want];

to .panelText a, but this then appies to to all of the panels.

I have also tried defining the a tag for each panel but that doesnt work either.

Any ideas?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Oct 15th, 2007, 12:40
Reputable Member
Join Date: Jun 2007
Location: UK
Age: 29
Posts: 172
Thanks: 0
Thanked 0 Times in 0 Posts
Re: color: inherit; issue with IE 7

Anyone?

I have read that IE has issues with inheritance, but I cant find a solution...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Oct 15th, 2007, 12:52
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: color: inherit; issue with IE 7

Would this link be helpful?

Did you try adding different classes to the different links?
There is an example above. I used this last week and it worked for me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Oct 15th, 2007, 13:00
Reputable Member
Join Date: Jun 2007
Location: UK
Age: 29
Posts: 172
Thanks: 0
Thanked 0 Times in 0 Posts
Re: color: inherit; issue with IE 7

Thanks for the reply. I already have separate class for the different links.

There is away round, setting the a attribute in a separate class for each item, but as I have dozens of classes, I was hoping there might be a cleaner way of doing it. After all, it works fine on firefox. Looks like I'll just have to have loads of code that shouldn't be needed.

By that I mean

.panel001{
background-image:url(../images/panels/001.gif);
height: 103px;
width: 361px;
color:#FFFFFF;
}
.panel001 a{
color:#FFFFFF;
}


(I have 12 of these so far, and probably more so it seems like a lot of extra code)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
background color in xml kool77 Other Programming Languages 2 Jul 7th, 2007 15:30
CSS noob - Help with border color browser issue please!!! Micky-D Web Page Design 4 Oct 14th, 2006 19:58
link color somsahi Web Page Design 3 Aug 25th, 2006 17:02
why h1 doesn't inherit font -size from body? sahota Web Page Design 3 Dec 12th, 2005 20:55
css validating - color issue ivyholly Web Page Design 13 Dec 6th, 2005 16:05


All times are GMT. The time now is 11:17.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42