.css problem

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   .css problem
gutchunks
CZ Newbie
gutchunks has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Apr 21, 2004
0.00 posts per day
Posts: 29
Points: 2,148
   
here is my problem

td.row1rt   {
background-image: url(../../../themes/Hybrid/forums/images/row1.gif);
background-repeat: repeat-x;
background-color : #3B3B3B;
BORDER-TOP: #3e3e3e 1px solid;
BORDER-BOTTOM: #000000 1px solid;
BORDER-LEFT: #000000 1px solid;
BORDER-RIGHT: #000000 1px solid;
}
td.row1rt:hover   {
background-image: url(../../../themes/Hybrid/forums/images/row1hover.gif);
background-repeat: repeat-x;
background-color : #3B3B3B;
BORDER-TOP: #3e3e3e 1px solid;
BORDER-BOTTOM: #000000 1px solid;
BORDER-LEFT: #000000 1px solid;
BORDER-RIGHT: #000000 1px solid;
}


this code basically makes a .gif stretch to %100 of the table cell in the forum index .. the second part makes a different .gif stretch across the same cell onmouseover ... this code works perfectly in firefox but the hover part doesnt work in IE ... am i missing something?

thanks in advance


Back to top Reply with quote
#2   re: .css problem
gutchunks
CZ Newbie
gutchunks has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Apr 21, 2004
0.00 posts per day
Posts: 29
Points: 2,148
   
i used a firefox extention to validate the .css from that page ...

the .css (as far as W3C is concerned) is perfectly valid .. yet it will NOT work in IE... im lost icon_sad.gif



Back to top Reply with quote
#3   re: .css problem
Kelly_Hero
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif southcarolina.gif
Occupation: Web Developer
Age: 59
Gender: Female
Website:
Status: Offline
Joined: Aug 20, 2003
0.49 posts per day
Posts: 3765
Points: 351,412
   
Sounds like you need an IE Hack. That's the problem. A lot of CSS still isn't cross browser compatible. While I can't give you the answer to your problem, I can give you an addy where they know a whole lot more about CSS than I do. Maybe they can give you the work around you need.
[ Register or login to view links on this board. ]

I've gotten quite a few answers there and the people are friendly and willing to help.



Back to top Reply with quote
#4   re: .css problem
gutchunks
CZ Newbie
gutchunks has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Apr 21, 2004
0.00 posts per day
Posts: 29
Points: 2,148
   
thank you for your reply

the weird thing is that IE is usually a lot more lenient toward the structure of .css than FF... for instance .... you can use '/' OR '\' for image paths in IE but you HAVE to use '/' in FF or it wont work ... if anything i'd expect IE to work but not FF ... thats not the case tho

i thank you for the link ... i'll check it out and if i find my answer i'll post it here



Back to top Reply with quote
#5   re: .css problem
gutchunks
CZ Newbie
gutchunks has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Apr 21, 2004
0.00 posts per day
Posts: 29
Points: 2,148
   
ok ... i posted on that site and basically this is what i was told



Bad news, the hover attribute only works on anchor elements in IE.

That is, you can have a:hover, but not tr:hover. There are some workarounds, search for IE7, for example, or you could make that header a link I suppose...


so using .css alone was out of the question .... instead i changed the code in the index_body.tpl for the table cell. i inserted a onmouseover and onmouseout and made each one have its own class ... then i tweaked the .css to reflect the changes

this is the original code from the index_body.tpl

<td class="row1rt" width="100%" height="59" onclick="window.location.href='{catrow.forumrow.U_VIEWFORUM}'"><span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a><br />

     </span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br />
     </span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td>


this is the revised code from the index_body.tpl

<td class="row1rt" width="100%" height="59" onmouseover="this.className = 'row1rthover'" onmouseout="this.className = 'row1rt'"onclick="window.location.href='{catrow.forumrow.U_VIEWFORUM}'"><span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a><br />

</span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br />
</span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td>


then i added this to the .css

td.row1rt{
background-image: url(../../../themes/Hybrid/forums/images/row12.gif);
background-repeat: repeat-x;
background-color : #3B3B3B;
BORDER-TOP: #3e3e3e 1px solid;
BORDER-BOTTOM: #000000 1px solid;
BORDER-LEFT: #000000 1px solid;
BORDER-RIGHT: #000000 1px solid;
}
td.row1rthover{
background-image: url(../../../themes/Hybrid/forums/images/row1hover.gif);
background-repeat: repeat-x;
background-color : #3B3B3B;
BORDER-TOP: #3e3e3e 1px solid;
BORDER-BOTTOM: #000000 1px solid;
BORDER-LEFT: #000000 1px solid;
BORDER-RIGHT: #000000 1px solid;
}


this allows me to have mouseovers with background-repeat .gifs in Internet Explorer

i hope someone else finds this helpful


Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum