Questions tagged [css]

CSS, short for Cascading Style Sheets, is a language used to control the presentation of HTML and XML documents including colors, layout, and fonts.

Filter by
Sorted by
Tagged with
0
votes
2answers
19 views

Template file for creating formatted webpages

This is my working template file which I manually edit to create new properly formatted webpages for my personal website. I am interested in what advantages if any could be realized by placing the CSS ...
2
votes
2answers
66 views

A snake game in HTML/CSS/JavaScript

I made a snake game in HTML/CSS/JavaScript. I want to make my code better and shorter. Here is my codes: index.html: ...
2
votes
1answer
27 views

Single price grid component (HTML & CSS Project)

I would appreciate some feedback on this single price grid component project completed using HTML and CSS. I am trying to recreate the content shown by this image: https://res.cloudinary.com/...
4
votes
1answer
67 views

HTML multi-level menu

I have some vanilla JavaScript for a website menu which works perfectly (thanks mainly to Titus on Stack Overflow), opening and closing a sub-menu (toggling ...
4
votes
1answer
57 views

Custom Connect Four game on CodePen using JavaScript

Can this code be shortened, optimized or remove any unnecessary parts. Just curious if this is the right way to achieve the given result in this CodePen example: CodePen Connect Four Here is my code: ...
1
vote
0answers
15 views

Is there a more dynamic way to target siblings in CSS / SCSS?

The code I'm working on looks like this - All the way up to 50... (Not ideal) There can be anywhere from 1 to 100 anchor/div combinations, but more often than not in single digits so there's almost ...
-1
votes
1answer
30 views

Changing the cursor type while hovering over a link in CSS [closed]

I just now started creating a cursor-type website and I created the default cursor section (The arrow pointer thingy), and it works just fine... until I hover over the link. The cursor type stays as ...
4
votes
1answer
117 views

Conway's Game of Life - Javascript

Conway's Game of Life Conway's Game of Life is a mathematical game invented by English Mathematician John Horton Conway. The game is based on the theory of cellular automatons. It is a so-called zero-...
1
vote
0answers
22 views

Improving interactive component performance with constant image translation

I am making this React Component for an interactive eye that moves and tracks the user's mouse cursor wherever it goes to in the webpage. However, I faced 3 problems while doing so. The eye moves as ...
6
votes
2answers
78 views

Type ahead in JS

I've been following Wes Bos challenge, I wrote the code myself then looked at his finished example. Here's my code (I only wrote the JS): ...
8
votes
2answers
209 views

Flex panels in CSS and JS

I was following Wes Bos JS 30-day challenge, so HTML and CSS are mostly are copy-paste, I'd like feedback on JS (mostly). Thanks. ...
1
vote
0answers
36 views

Is there a better way to preview the addition of a new element?

I am to preview where a new element will be added on button click. I thought about just creating the element and showing that in the preview, but I have several buttons and some of the elements they ...
3
votes
0answers
39 views

Simple single css node parser written in rust

I am new to rust and I wrote a little program that takes a part CSS selector and returns the name of the element and two vectors containing its attributes (classes, ids) Example div#menu.big.pink =&...
3
votes
0answers
18 views

Text centered in a circular component

I have surrounded my initials with a circle. This is intended to be a re-usable component in a responsive layout. (When it is re-used the text will always be two letters, and the font won't change. It ...
3
votes
1answer
48 views

Iterate through multiple elements with different IDs in jQuery

I'm very new to jQuery and I managed to make this code work but I'm pretty sure that it could be made in a more efficient way. For example, it should be a way to send the id as a parameter instead of ...
6
votes
1answer
41 views

Vanilla JS/CSS — set of buttons to trigger sliders by transitioning height value

I've been working on a solution that allows a set of buttons to reveal divs that slide down from above on-click. I needed each button to toggle an active state for itself, but also if the user were to ...
2
votes
0answers
31 views

I need a better way to add css per each page on wordpress

I just started to use Wordpress to start building a website, but as I need to use the get_header() function to retrieve the ...
7
votes
2answers
239 views

Animated Calendar using HTML + CSS + JS

I'm a beginner developer and I'm building a calendar for smartphones. I'm using HTML, CSS and JS. I'm not entirely done with the project yet, however, I have the feeling that I'm making a messy code. ...
-1
votes
1answer
78 views
7
votes
2answers
118 views

JavaScript Tic Tac Toe implementation

I've been trying to get into web development, so I made a quick Tic Tac Toe implementation. It feels messy to me, but I'm not sure what is really considered to be good practice and what not. Any poor ...
1
vote
1answer
76 views

Hover on bootstrap card overlay

Just created an overlay on hover following a Youtube tutorial - but I adjusted some css to make it responsive. I'd like to hear hear some reviews or suggestions where I can improve. ...
1
vote
0answers
22 views

Bootstrap container layout system bug

As is known, the .container- class in Bootstrap 4.x.x and 5-alpha has an bug in intermediate classes. To give a little more detail, The ...
6
votes
3answers
456 views

Selecting elements from the DOM of a page

To get the book list from https://www.java67.com/2015/09/top-10-algorithm-books-every-programmer-read-learn.html , I am using the following code in the console of the firefox DevTools: ...
2
votes
0answers
34 views

CSS Content Flex

I would like to create a table where each column header contains a column name and a sort symbol. To do this, I'm using bootstrap. You can see my code below: ...
7
votes
2answers
113 views

Example of responsive webpage

I'm doing a Coursera assignment on an HTML-CSS course. The assignment is to do a simple responsive page, which can be found here. I think I came up with a solution, but I ended up having around 100 ...
2
votes
0answers
31 views

Device-specific page design with gatsby

I've been coding for a couple weeks now and have nearly finished the first version of a gatsby site for a landing page. My aim is to make the addition of new pages to the website as fast as possible ...
4
votes
1answer
69 views

Simple website made for learning purposes

Hello I've just finished coding one of my first websites. And I would love some feedback. I know that I really need to improve my design and improve my code and for that I need some tips from you guys ...
7
votes
2answers
127 views

PHP Mandelbrot Set Generator

I need to get familiar with web programming, so I decided to write up a fairly simple PHP page that accepts GET requests and serves back an image of the Mandelbrot set... as a table of colored cells. ...
1
vote
2answers
61 views

Javascript to-do application for native Javascript

I did a simple to-do application for native Javascript. This is my first time, previously I used only jQuery. What recommendations would be useful? https://codepen.io/denibudeyko/pen/MWyEmox ...
1
vote
1answer
25 views

Iterate through multiple elements based on their id in jQuery

Haven't worked too much with jQuery and I had to get the values from different elements (they have the ids 0, 1 and 2) in order to compute the sum of them and update a field with that value. The code ...
3
votes
1answer
101 views

Contact form with spam-prevention

Idea After a handfull of small javascript-projects, I also wanted to work a bit with php now. I decided to create a simple contact-form. Of course, I wanted it to be as spam-save as possible, so I ...
2
votes
1answer
57 views

Vanilla JS random quote webpage

I built a quite simple webpage to display a random quote from an array of quotes. I would love to have some feedback on the JS, CSS, and HTML, for example, feedback about best practices, ...
2
votes
0answers
35 views

C# Color implementation with conversions from RGB to HSL and CMYK and vice versa, targetting Blazor and CSS

This is an implementation of a Color class, primarily targetting the web to be used in a Blazor app. Color.cs ...
2
votes
1answer
46 views

Typescript design pattern for rendering different objects with similarities

It's a web project. The code is working. The question is a design pattern question to write code that's more elegant, you know. I've created a Codepen of this question. I created a ...
2
votes
0answers
20 views

Simulating arbitrary amplitude pendulums and double pendulums with p5

I'm an experienced python 3 programmer but I've recently started focusing more on JS to make client side applications for my website. So I'm not too familiar with advanced level techniques, best ...
8
votes
2answers
273 views

Follow-up: Javascript Syntax-Highlighter for Java

Background The basics of this project have already been discussed here. I've improved the following things: Sᴀᴍ Onᴇᴌᴀ mentioned that I shouldn't use multiple elements with the same id. I corrected ...
1
vote
0answers
20 views

Survey page - is using a table the best way to get all fields to align?

The code below was for a code camp project and done in Codepen (so the CSS is automatically referenced). Here is the link: https://codepen.io/andyzam/pen/mdVvrLB I wanted the input fields to align ...
4
votes
0answers
64 views

Created a paperfold like effect

I am trying to recreate a neat effect that I saw posted on Stack Overflow as a GIF . I am trying to recreate this with CSS and JavaScript and I have created a similar effect with a button press. I ...
1
vote
1answer
31 views

Volunteer Signup Website Homepage

I'm doing an exercise where I pick an existing webpage and I code its front end (in HTML and CSS) from scratch, just by looking at it. I started off with an easy one. It would be great if somebody ...
11
votes
4answers
2k views

Javascript Syntax-Highlighter for Java

Project I wanted to create a syntax highlighter for Java using JavaScript, HTML and CSS. It uses regular expressions to find the parts that should be highlighted (at the moment: keywords, strings, ...
4
votes
1answer
54 views

Improving the speed of the injection of class element selectors to HTML tables (sometimes nested) at scale through loop iteration or other methods

Background and Code I am using the following JavaScript code to inject CSS classes into a webpage after the page has loaded. These classes act as selectors that I can use to pinpoint a table cell to ...
1
vote
0answers
26 views

Static mockup of a website

I'm diving into front-end stuff for the first time. I thought a good way to get started was to try to do a mockup of a website. I took the top part of Microsoft's home page. Here's a link to the ...
3
votes
1answer
40 views

Master Doughnut Shop Website

I made my first website from scratch using HTML and CSS. It's a doughnut shop I did this as a way to practice what I have learned so far from an HTML and CSS course that I am taking. I would ...
7
votes
1answer
120 views

A simple tic tac toe game in Javascript/HTML/CSS

This is my first web app written in JS. I would like to know how the code can be improved in terms of style and structure, especially in terms of following JS's conventions and general heuristics. I ...
4
votes
1answer
44 views

CSS exercise of cloning background image

I believe I'm writing in the correct place. However, I'm not fully sure, and I am relatively new to Stack Exchange. If it is not, and can be moved by an admin/moderator in the correct place, please do ...
3
votes
1answer
46 views

Selecting a div with a blue border and changing its text

I have a function that I created in Codepen. It does what I want, where the div that you select gets a blue border and changes its text. But I would like to know if there is any way to make the ...
3
votes
1answer
95 views

CSS preview generator (in python)

Given a CSS file the script generates an HTML preview of all the CSS definitions by recursively drilling down the chain of nested classes, ids and tag names. Rules with ...
4
votes
1answer
69 views

Keyframes animation

Is there a way I could simplify this with Sass or JS? It works, but it's not what I'd call 'DRY' code. An alternate form I've tried is a Sass for loop but can't get ...
1
vote
1answer
35 views

Semantic implementation of the structure of a web page with header, main, and footer

I'm new to web development, and currently learning the basics of HTML and CSS. Many web pages follow the structural pattern of header, main, and footer; so I figured it'd be a good idea to try and ...
0
votes
1answer
37 views

Best method to further execute the DRY principle and/or raise performance in my script? (client login/signup system)

Just for practice purposes, I written a basic client sided login/signup system that allows you to make an account, and then log into the account from my webpage. What it does is append to an object ...

1
2 3 4 5
20