Forum Moderators: coopster

Message Too Old, No Replies

::before appearing on page

I don't have this command in my php code

         

TheKG

3:31 pm on Oct 20, 2022 (gmt 0)

10+ Year Member Top Contributors Of The Month



I have a page where I sell hats; it has been working just fine. I recently wanted to add ball caps to the page and simply added them to my data bases exactly as the existing hats. However, when I look at the page, the existing hats display perfectly, but the images for the new ones do not. I inspected the element and there is a ::before code that appears; I do not have this code on my page.

I checked to make sure the images are in the appropriate folders and they are correctly referenced. The style number of the ball caps is H64; could that be an issue?

I am at a loss with this one. Any suggestions would be appreciated.

not2easy

1:39 pm on Oct 24, 2022 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



By any chance do you have a php error log that might point out the line number to look at for troubleshooting?

Sorry, I don't speak php, but I have been able to look at the specific line shown in the error log so I can see what kind of issue I need to research. It could help find the issue.

In the off-chance that it is related to the style number, can you alter it in the database? It would not seem likely because usually a script would enclose content text entities outside the code itself.

robzilla

3:11 pm on Oct 24, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



::before is a CSS selector, unrelated to PHP. I don't know what "H64" or a "style number" is; a class name perhaps?

You're saying the images are correctly referenced, so they're in the HTML source? Are they being downloaded in the browser? You can use the Network tab of the Developer Tools (opens when you inspect an element) to verify.

lucy24

5:25 pm on Oct 24, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Continuing robzilla's line of thought...
I do not have this code on my page
But do you have it anywhere? When an issue only arises on one page, the obvious first thought is to pore over that same page, but it may only be coincidence. Say, your shared css says
div.classname::before {blahblah}
and it randomly happens that the offending page is the only one with a div called classname.

DId you make all of your own CSS, or does some of it come from other sources? It could be anything from a shared library or “theme” to something generated by php.

TheKG

5:34 pm on Oct 24, 2022 (gmt 0)

10+ Year Member Top Contributors Of The Month



Solved it! For some unknown reason, there was a space added in when referencing the image. I saw it when I was inspecting and looked over the CSV. Although it did not appear to have a space, I just retyped the path to the image file and it worked.

Thanks to all that responded with suggestions!