QUICK NEWS

{NEW} - A new css video is up.

{OLD} - New video courtesy of Skhilled, Thanks for posting it up.

Video of the moment:


Internal Links

SMF Sites

Quick Info

.calendar_today Issues

Started by Skhilled, Aug 13, 2022, 12:07 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Skhilled

I'm pretty sure I've done something wrong somewhere but I can't change the background for the current date in the calendar:

https://www.jpr62.com/demos212/index.php?action=calendar

Bigguy

The number is bolder. Maybe investigating that will help you solve this.
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

Bigguy

I just did it in the inspect web developer thing in FF.
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

Bigguy

You might have to do it inline though I'm not sure. You could add maybe:

days calendar_today
background-color: red;

to the css and see what happens.
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

Skhilled


Bigguy

Make your own:

.days calendar_today

or:

#days calendar_today

Then add that line I said. All I did was go to inspect...after that in the second window at the bottom under "This element". I typed in:

background color: red;

It changed it. I also noticed in the first window it had added to the:

Td class= "days windowsbg"

now one of them says Td class= "days calendar_today" style= "background-color: red;" I will upload a screenshot of what I see.
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

Bigguy

"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

Skhilled

Ok, I'm not sure what is wrong but it does work with the "element" but not with either of the codes you've given me. The funny thing is that it used to work before but now I have no idea what's going on. :o

To make matters works, this kooky keyboard keeps acting up on me. >:(  Me thinks that's part of the problem if not the whole problem.

Bigguy

"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

Skhilled

Ok, I sort of found out what's going on. LOL I had changed all of the days' background color so they would all be the same and that's what is preventing it from showing. Now, I have to narrow it down to getting all of the backgrounds the same color except for the current day.

Bigguy

"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

Skhilled

Almost... LOL I did forget to mention this should be the code for it:

#main_grid .calendar_today {
  background: red;
}

But it only works for the main grid. I'm having the same issue with the month grid now and it won't change. I may have to start over so I can figure out what's wrong. The good thing about starting over only for the calendar.css file is that it's a small file. LOL

Skhilled


Bigguy

It looks good, but when you hover over today's date the number is hard to see cause it turns white. Also, the 31st of July looks highlighted a bit, along with the first second and third of September for some reason. They don't look like today's date but they are white.
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

Skhilled

#14
Quote from: Bigguy on Aug 14, 2022, 08:36 AMIt looks good, but when you hover over today's date the number is hard to see cause it turns white.
Ah! I didn't notice that...thanks!

EDIT: Fixed. :)

Quote from: Bigguy on Aug 14, 2022, 08:36 AMAlso, the 31st of July looks highlighted a bit, along with the first second and third of September for some reason. They don't look like today's date but they are white.
That's because they are "disabled" for the current month. The one at the top is from the previous month and the ones at the bottom are for next month. That is how SMF and a lot of themes do it but I was debating on making them the same color as the days of the current month.

Bigguy

Quote from: Skhilled on Aug 14, 2022, 08:41 AMThat is how SMF and a lot of themes do it
I see. I was not aware of that. I think it would look better blending in with the current month but that's just my opinion.
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

Skhilled

Actually, the original one has them all the same color so I'll do it that way.

Skhilled

Fixed. Now the only thing missing for the calendar is the dark right and bottom border for the current day. When I had it working last time it showed but not now. I guess I've got more digging to do. LOL

I believe it's a box-shadow.

Bigguy

That looks good for sure. :rgton  Not sure if it's a box shadow or a border you want.
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

Skhilled

Look at the original here:

https://www.jpr62.com/demos/index.php?action=calendar

Here's the code for it:

.calendar_today {
  background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#a7a9ac));
  background: -moz-linear-gradient(top, #ffffff, #a7a9ac);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffffff, endColorstr=#ffa7a9ac);
  -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffffff, endColorstr=#ffa7a9ac)";
  -moz-box-shadow: 3px 3px 3px #000;
  -webkit-box-shadow: 3px 3px 3px #000;
  box-shadow: 3px 3px 3px #000;
  filter: progid:DXImageTransform.Microsoft.Shadow(color='#767676', Direction=135, Strength=5);
}

I think something is conflicting with it.

Bigguy

OK, that makes sense then. :)
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

Skhilled

If I disable border-collapse in dev I can see it:

#main_grid table {
  border-collapse: collapse;
}

However it makes all of the borders much wider...

Bigguy

Hmm, not sure what to do there....
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

Skhilled


Bigguy

Lookin good. I may have to use that theme for here when it's done. I'm likin it. :rgton I might change the background but that would be it I think.
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

Skhilled

Did you actually READ the polls??? :whi

Bigguy

:rflmao Not til now, lol. Not sure what to say about that.  :dontknow
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

Skhilled

Yeah, I know...I'm not right in the head. Been hearing that since I was a kid. LMAO