October 21, 2024
Chicago 12, Melborne City, USA
HTML

How to make a hardcoded right-click menu to appear on the screen?

On my own compiler, the menu doesn’t even change a bit. When I tested here, it’s a bit better, for it does block the original default right-click menu. However, this hardcoded JS one does not appear either. I’d like to ask is there any problem with the code here, or it just doesn’t work like

Read More
HTML

z-index menu sub-menu css

During the interface development, I encountered z-index issues with the menu and submenu. The first-level menu needs to be above, and the second-level menu below. In the ‘Electronics’ section, the submenu items are overlapping. I need to prevent this from happening without removing the menu. Alternatively, suggest another method to maintain the appearance of the

Read More
HTML

I keep having issues with importing font families to css

I am making a clicker game and I’m trying to change the font of the text by importing a font family from my computer. Here’s the code: <style> @font-face { font-family: Futur; src: url(FUTURAMEDIUM.TTF); } #ClicksCounter { text-align: center; margin-top: 425px; font-size: 30px; color: white; font-family: Futur; } </style> I directly imported the font family

Read More
HTML

preg_replace_callback whitespace ignored in menu build

I am dynamically building a ulli menu from .json I have searched a LOT on this and can’t seem to find a solution. Everything works fine with the callback – the relevant file called delivers and the content code-build is fine… but, it all ignores white space on the page. As I say, the code

Read More
HTML

Web to mobile whatsapp message

I created a simple form with a submit button, text and phone entries. When I press the send button, whatsapp web opens and when I enter it from a mobile phone, whatsapp.com opens. I’m trying to open mobile whatsapp with the text I wrote let number = mobileNumber.replace(/[^\d]/g, ""); let url = `whatsapp://send?phone=${number}&text=${encodeURIComponent(message)}`; and chatGPT

Read More
HTML

Beautifulsoup NoneType object has no attribute 'find_all'

Following this tutorial https://www.scrapingdog.com/blog/scrape-indeed-using-python/, and running into this error: Traceback (most recent call last): File "C:/Users/det-lab/Documents/PycharmProjects/Indeed_webscrape/Indeed_job_data.py", line 23, in <module> alllitags = allData.find_all("li", {"class":"eu4oa1w0"}) AttributeError: 'NoneType' object has no attribute 'find_all' Here is my version of the program: import requests from bs4 import BeautifulSoup l = [] o = {} #declare the target URL and

Read More
HTML

JavaScript components working in testing mode but not after published live

I’ve created a simple website template with HTML, CSS, and JavaScript. I tested it manually in Live Server mode (Visual Studio Code), and everything worked fine. I’ve updated the website’s code, and while running it live, I noticed that the features depending on JavaScript don’t work. I’m talking about 2 features having the issue: Hamburger

Read More
HTML

How to apply one function to all elements with the same class

I want to click on any of the 3 buttons, and they all will change their background colors at the same time. What is missing or needed to change in my code, for the addEventListener to be able to apply in all elements with the same class? const one = document.getElementsByClassName('one'); one.forEach((element) => { element.addEventListener("click",

Read More
HTML

Creating a table using html. How to make the cells not move out?

I need to make a table like this in HTML. Tried to do a normal layout, but any time I try to fix something, the table moves away….. <style> table { border-collapse: collapse; width: 100%; } td, th { border: 1px solid black; padding: 8px; text-align: left; } </style> <table> <tbody> <tr> <td colspan="2" rowspan="2"></td>

Read More
HTML

MouseEvent behaves strangely when developer tool window is closed

I am developing a flask application with html and javascript for web interface. The application behaves strangely in Mouse events when developer tool is open the mouse press event happens at the position clicked but when closed the response is at a point different than the one clicked. I have removed console.log statements,still the behaviour

Read More