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

Header/Footer on each print Page

Using HTML/CSS, I want to print a header (p.e. logo+company name) / footer (p.e. contact details) on each print page. Using this: @media print { @page { margin-top: 3.5cm; margin-bottom: 3.5cm; } header { position: fixed; top: 0; left: 0; right: 0; height: 2.5cm; } } I get the header element to appear on each

Read More
HTML

how to automatically enable a button without clicking on it?

i want the first button to be clicked right when the page loads im building it using html,css, typescript <div class="media-column"> <!-- posts button --> <button #postsButton class="media-button"(click)="applyFilter('posts')"> <span class="media-label">Posts</span> </button> <!-- images button --> <button class="media-button"(click)="applyFilter('images')"> <span class="media-label">Pictures</span> </button> <!-- videos button --> <button class="media-button" (click)="applyFilter('videos')"> <span class="media-label">Videos</span> </button> </div> i tried but it

Read More
HTML

How do I make my navbar items vertical while letting the logo and icon stay on top

It’s my first time doing some responsive design and I use this as an excercise. But after trying this for several hours I’m desperate now. So I have a simple Navbar with a logo at the left corner, four nav-items in the middle and three buttons at the right. When the viewport is reaching a

Read More
HTML

How to nest inside ?

I’m using Svelte 5. <a href="my-first-link"> <div> <!-- Some elements --> </div> <a href="my-second-link"> <div> <!-- Some other elements --> </div> </a> <div> <!-- Some elements --> </div> </a> Svelte is throwing a lint error: `<a>` is invalid inside `<a>`svelte(node_invalid_placement) What is expected in this situation to fix this issue? You need to sign in

Read More
HTML

Why does Youtube have elements inside of a element

I have been learning how to structure HTML documents and want to understand best practices. From what I have read, it has been stated that div elements cannot be declared inside of span elements. In the picture there is clearly a div inside of the span. I tried to find out why Youtube would have

Read More
HTML

Why is the event listener not working properly?

I am making a Tic-Tac-Toe game using HTML, CSS, and JavaScript. I tried to add an event listener so to check whenever the button is clicked and added a condition to check whose turn it is. When clicked it should display the button is clicked and print the text according to the condition whenever the

Read More
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