If you are seeing this message, it is possible the page did not load properly. Please hit reload/refresh on your browser.
If you still see this message, you probably do not have a browser that supports web standards, although its content is accessible to any browser or Internet device.

Cool Tips & Tricks Cool Tips & Tricks

Help Communities:
Help Forums Bug Base
<< Prev Topic | Next Topic >>
Cool Tips & Tricks ::: CSS ::: Alternating row colors *within* specific forums
New Topic    Add Reply
Topic: Alternating row colors *within* specific forums  (?)  Click to receive email notification of replies Click to stop receiving email notification of replies email this topic to a friend
master of manga

Registered User
ezSupporter
Posts: 3
Posted: 9/15/04 2:39 am    
Alternating row colors *within* specific forums

This has been driving me batty, and I'm sure I'm just missing something.

I want to have alternating row colors in the lists of topics within specific forums themselves. I've configured my board so that it has alternating row colors on the forum directory (main) page, as well as within message threads. But nothing I do seems to alternate the row colors within the topics lists.

Examples:

My main page, with alternating row colors just as I want it:
p074.ezboard.com/bhowtodrawmangaandanime

A message thread, with alternating row colors:
p074.ezboard.com/fhowtodr...D=55.topic

And finally, a forum's message list, with no alternating row colors:
p074.ezboard.com/fhowtodr...animefrm19

Is it possible to fix this?


  reply to this message

chrish18

Registered User
ezSupporter
Posts: 1251
Posted: 9/15/04 2:43 am    
Re: Alternating row colors *within* specific forums
Have you not changed the Message Thread Rows 1 and Message Thread Rows 2?


  reply to this message

master of manga

Registered User
ezSupporter
Posts: 3
Posted: 9/15/04 8:16 pm    
Re: Alternating row colors *within* specific forums
Yes, the Message Thread Rows 1 and Message Thread Rows 2 colors have been set. Those are for the alternating rows within message threads themselves, and I'm having no difficulty with that whatsoever. (See link in my previous post.)

I'm trying to set alternating row colors in the lists of message topics.


  reply to this message

chrish18

Registered User
ezSupporter
Posts: 1269
Posted: 9/16/04 3:08 am    
Re: Alternating row colors *within* specific forums
If it cant be done through the custom colours then it would have to be done with javascript, and no script exists for that :(


  reply to this message

chrish18

Registered User
ezSupporter
Posts: 1271
Posted: 9/16/04 3:47 am    
Re: Alternating row colors *within* specific forums
You caught me in a good mood :b

Put this in box 1, change the bit in red to the colour you want
 
<style>
.alternateTopicListing {
  background-color: #FF0000;
  font-size: 80%;
  font-family: verdana, helvetica, sans-serif;
}
</style>


Then put this in box 4
 
<script type="text/javascript">
var TBL = document.getElementsByTagName("TABLE");
for (x = 0; x < TBL.length; x++) {
  if (TBL.item(x).getAttribute("width") == "100%" && TBL.item(x).innerHTML.indexOf("Topic") != -1 && TBL.item(x).innerHTML.indexOf("Last Comment") != -1) {
    if (TBL.item(x).parentNode.parentNode.parentNode.parentNode.nodeName == "TABLE") {
      var TR = TBL.item(x).getElementsByTagName("TR");
      for (y = 1; y < TR.length; y+=2) {
        var TD = TR.item(y).getElementsByTagName("TD");
        for (z = 0; z < TD.length; z++) {
          TD.item(z).className = "alternateTopicListing";
        }
      }
    }
  }
}
</script>


  reply to this message

master of manga

Registered User
ezSupporter
Posts: 4
Posted: 9/16/04 4:50 am    
Re: Alternating row colors *within* specific forums
Thanks for the code.

Unfortunately, it didn't work for me. I did as instructed, by all rows remain the same color.

I do have other customized coding (primarily css, no javascript) in the first and fourth boxes, so perhaps there's a conflict that won't allow the code you've written to work properly.


  reply to this message

chrish18

Registered User
ezSupporter
Posts: 1276
Posted: 9/16/04 5:07 am    
Re: Alternating row colors *within* specific forums
Can you post a link to your board please :)

Edit: Ops n/m it's up there! :)

Edited by: chrish18 at: 9/16/04 5:11 am

  reply to this message

chrish18

Registered User
ezSupporter
Posts: 1277
Posted: 9/16/04 5:15 am    
Re: Alternating row colors *within* specific forums
No problem, you just need to move the script from box 3 to box 4 :)


  reply to this message

chrish18

Registered User
ezSupporter
Posts: 1278
Posted: 9/16/04 5:17 am    
Re: Alternating row colors *within* specific forums
Oh and on a side note, it might not be causing problems now but it might in the future, in your sidebar code, right at the beginning there is a missing "
 
<table width="100%" cellspacing="0" style="padding: 0px; width: 100%" cellpadding="0"> 
<tr height="60"> 
<td style="background-color: #b7b7b7" width="183" align="left" valign="top" height="60">


It's bold and red on the last line there :) You should add it :)


  reply to this message

master of manga

Registered User
ezSupporter
Posts: 4
Posted: 9/16/04 7:37 pm    
Re: Alternating row colors *within* specific forums
Wow! Works like a charm. Thank you very much!

I also added the missing quotation marks in the sidebar code. Thanks for catching that!

If any of the admins happen to read this thread, I'd highly recommend that chrish18's javascript be included in one of the Cool Tips and Tricks FAQs. I'm sure there are many others like me who want these alternating row colors within the forum message lists.

Thanks again, chrish18! You're a champ!



  reply to this message

Click to receive email notification of replies Click to stop receiving email notification of replies email this topic to a friend

New Topic    Add Reply

jump to:
Topic Control Image::: Topic Commands
<< Prev Topic | Next Topic >>

Icon Legend

reply button:::Reply to Post Button   edit button:::Edit Post Button  delete button:::Delete Post Button (Moderator Only)

subscribe/unsubscribe to thread button:::Subscribe to Thread Button   email to friend button:::Email to Friend Button  



- Cool Tips & Tricks - CSS -

Communitiesezboard Help Communities:

Help Forums Help Forums Bug Base Bug Base





Powered By ezboard® Ver. 7.32
Copyright ©1999-2007 ezboard, Inc.