SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2005
    Location
    USA
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using a class within a class?

    I've re-worked the calendar I use on this site, but ran into a FF/IE problem. http://www.sunrisechristian.org/mcalendar.htm On this page I am using the .active class for events relating to faculty and the .activeH class for events relating to students and/or parents.

    On the 19th, both events are listed. I added the .active class to the li and have a separate background-color for the Teacher Inservice. It looks right in IE, but in Firefox the background-color doesn't reach across. Here is the pertinent CSS:
    Code:
     /* td.active for AWAY games or faculty-related events */
    .caltable td.active, .caltable li.active { background-color: #DBC2BF;
    	color: #000000;
    	font-weight: bold;
    	width: 14%;
    	padding: 2px 6px 2px 6px; } 
    
    	 /* td.activeH for HOME games or student/parent-related events */
    .caltable td.activeH, .caltable li.activeH { background-color: #730041;
    	color: #ffffff;
    	font-weight: bold;
    	width: 14%; 
    	border-right: thin solid #DBC2BF;
    	border-bottom: thin solid #DBC2BF;} 
    
    .caltable ul {list-style-type: none;
    	text-align: left;  /* for IE */
    	margin: 0;
    	padding-left: 12px;
    	padding-right: 6px; }
    
    .caltable li { margin-bottom: 8px; }
    What do I need to tell Firefox?

  2. #2
    SitePoint Enthusiast slide's Avatar
    Join Date
    Sep 2004
    Location
    Baton Rouge, La
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, you have both the active and activeH classes width at 14% which is making the li only 14% of the td, which is not want you want, you probably should seperate the classes for the li and the tds, imho
    Once you eliminate the impossible, whatever remains,
    no matter how improbable, must be the truth.

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2005
    Location
    USA
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, slide, that was exactly the problem! I made the li a different class and now it works perfectly in Mozilla (and Netscape). Thanks!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •