Entrance Chat Gallery Guilds Search Everyone Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
September 04, 2025 - @736.20 (what is this?)
Activity rating: Four Stars Posts & Arts: 58/1k.beats Unread Topics | Unread Replies | My Stuff | Random Topic | Recent Posts Start New Topic  Submit Art
News: :ha: :pc: Hello Melonland! :pc: :happy: Super News: Upload a banner! (or else!)

+  MelonLand Forum
|-+  World Wild Web
| |-+  ✁ ∙ Web Crafting
| | |-+  Do you forget about CSS classes you've created?


« previous next »
Pages: [1] Print
Author Topic: Do you forget about CSS classes you've created?  (Read 229 times)
DorianBay
Newbie ⚓︎
*


♪ Under the sign of Winx

⛺︎ My Room

View Profile WWW

Joined 2025!
« on: August 30, 2025 @558.36 »

Hi there! My current project is my personal Neocities site. I keep on adding pages and content to it and have created quite a good framework for myself. Whenever I can, I use classes I've already defined in my CSS, but it sometimes happens that I create a new class and then later find a similar class that's already been created for another page.

I have a few external CSS documents and put page-specific CSS between their head tags, which makes it difficult to keep track of all of them, to be honest :ozwomp: Am I just being careless or does this happen to you as well? XD
Logged

MediocreMetastasis
Full Member ⚓︎
***


Personal Text

⛺︎ My Room
Itch.io: My Games

View Profile WWWArt

Joined 2025!
« Reply #1 on: August 31, 2025 @439.68 »

Each page on my site is so stylistically different that I can't use the same CSS.
Of course when I make pages that are similar I'll use the same CSS file but one page has a 2000s futurism style and the next is medieval. I should probably make some basic classes in one file such as a flex box or grid just so I don't have to fiddle around every time.
Generally if you know that a page you're making for your site is gonna be similar to another one. Import the same css file you used and use the same class names. If the class if similar to what you want but you want to change some things. You can always overwrite the css on the html page.
« Last Edit: August 31, 2025 @442.77 by MediocreMetastasis » Logged

DorianBay
Newbie ⚓︎
*


♪ Under the sign of Winx

⛺︎ My Room

View Profile WWW

Joined 2025!
« Reply #2 on: September 02, 2025 @454.79 »

Each page on my site is so stylistically different that I can't use the same CSS.
Of course when I make pages that are similar I'll use the same CSS file but one page has a 2000s futurism style and the next is medieval. I should probably make some basic classes in one file such as a flex box or grid just so I don't have to fiddle around every time.


I took a look at your site, and man is it amazing! I love the style(s)! Some basic classes can definitely make things easier despite the diversity of the pages.

Generally if you know that a page you're making for your site is gonna be similar to another one. Import the same css file you used and use the same class names. If the class if similar to what you want but you want to change some things. You can always overwrite the css on the html page.


That's generally what I do. The problem is that I have quite a few basic classes and element selectors. A part of my pages gets changed as soon as I link the CSS because of the selectors, and I remember the classes I use regularly but I tend to forget about the flexbox class, for example, so I just go on to create new ones for every file. It's not a huge issue but it makes me feel sloppy so I was wondering if it's just me or does it happen to everyone (I'm new to webmastery and like to perfect my practice where I can)

Logged

MediocreMetastasis
Full Member ⚓︎
***


Personal Text

⛺︎ My Room
Itch.io: My Games

View Profile WWWArt

Joined 2025!
« Reply #3 on: September 02, 2025 @520.73 »

Quote
I tend to forget about the flexbox class, for example,

I do have a dedicated flexbox in my main css file but theres like 5-6 other ones in the same file and
to be fair flexboxes have a lot of nuances. You could make a template for a basic column flexbox but what if you need to increase the gap or have only 3 elements in each column with the middle column being smaller than the rest.
I also have multiple classes that could be one main class and multiple small ids to make it look cleaner but I'm too lazy to do that. I declared primary and secondary color variables to easily change if I wanted to but I don't use them. My CSS isn't amazing but. If it works it works and you should only worry about it once it significantly affects performance (which is basically never).
« Last Edit: September 02, 2025 @563.97 by Melooon » Logged

Paprika
Hero Member ⚓︎
*****


Go to the tanterwomps for they are lost in time

⛺︎ My Room
XMPP: Chat!

View Profile WWWArt

Great Posts PacmanThanks for being rad!the one and only paprika!Giver of Many Welcomes!Joined 2024!
« Reply #4 on: September 02, 2025 @881.05 »

not really because I name the classes for its core functions with hints at the name. For exemple, my enlarging when hovering with cursor is named .embiggen

It's Ms Marvel's (Khamala Khan) shout when she gets a part of her body bigger for fighting purposes (such as hands, feets, etc) so I know that without checking, if I want an enlarging at hover I just have to add class="embiggen" and I don't have to even look at the CSS to know what it does.

I used to forget or mix myself because at the beginning I used numbers like class one, class two, etc. So I moved to a better naming system for myself and it works nicely (so far...)
Logged

devils
Sr. Member ⚓︎
****


very cool very swag i like it

⛺︎ My Room
StatusCafe: devils
RSS: RSS

View Profile WWW

First 1000 Members!Joined 2023!
« Reply #5 on: September 03, 2025 @433.47 »

Not really, mostly because I don't have many classes or ids. I used to struggle with it too, but changing it to semantic HTML helped me a ton because instead of
Code
<div class="section"></div>
I can just write
Code
<section></section>
It just makes easier for me to remember the few classes I have if I'm not worried about the basic structure of the site (besides, it is a good HTML practice, especially when it comes to accessibility for screen readers...). I also give each class and id a fairly descriptive name.

I used to not care for these aspects too much and just went with div soups when I first started coding, but nowadays I can't bring myself to code like that ahahah.
Logged

:dog:
Pages: [1] Print 
« previous next »
 

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | ~ Send Feedback ~ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi