- This topic is empty.
-
AuthorPosts
-
May 5, 2015 at 10:54 am #201672
Historical Forums User
ParticipantHere are the two pages in question:
30CARE: http://30dollartech.com/30care-support-plans
CORE24: http://30dollartech.com/core-24-support-plansInitially I was only going to offer 30CARE but then realized I needed a product offering for servers, so I created CORE24. I bring this up because the way I got each section of the pricing table to be a particular color was formulated around the idea that there wouldn’t be another pricing table on the site… and now there is.
Here’s the CSS I’m using to color the tables. You can see that on the CORE24 page this works. On the 30CARE page however, you can see that it does not.
.stack-pricing div:nth-of-type(1n+0) ul.price-list .row-title { background: #179100; } .stack-pricing div:nth-of-type(2n+0) ul.price-list .row-title { background: #097288; } .stack-pricing div:nth-of-type(3n+0) ul.price-list .row-title { background: #e9840d; }
I am very new to pseudoclasses and I don’t fully understand the mathematical operators. I expected that I could just make a 4n+0 and 5n+0 and a 6n+0 to deal with the new table but doing that breaks everything (color wise).
I’m sure this is simple but I’ve been at it for two hours and I can’t figure it out.
Can anyone help?
May 5, 2015 at 11:21 am #201676Historical Forums User
ParticipantThank you, so much, for taking the time to explain that Senff. I appreciate it very much. I’ll give it a whirl. If you don’t hear back from me it’s because it worked. Thanks again.
Tanner
May 5, 2015 at 11:37 am #201679Historical Forums User
ParticipantJerba, thanks.
Senff, I still have the issue but now it’s in reverse. I hope I’m not being dense here. My modified codes is now:
.stack-pricing div:nth-of-type(2) ul.price-list .row-title { background: #179100; } .stack-pricing div:nth-of-type(3) ul.price-list .row-title { background: #097288; } .stack-pricing div:nth-of-type(4) ul.price-list .row-title { background: #e9840d; }
It works on 30CARE but not on CORE24. Shouldn’t that not happen? I mean, the browser doesn’t know there’s another table on the site. Shouldn’t it treat the tables on CORE24 the same way it treats the tables on 30CARE? 2,3,4 doesn’t become 5,6,7 for the CORE24 page … does it?
May 5, 2015 at 1:29 pm #201690Historical Forums User
ParticipantHow silly. I’ve given them both titles now. Thank you, Senff, for your patience and your insight. Have a good week.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.