I don't have a personal site yet. But when I do, I plan to make it with HTML+CSS+JS/JQ only
Maybe apache or nginx as webservers
host it on shared stuff or AWS free tier
I just need to figure out how to center a div, and then I'll be in the business.
AWS free tier. S3+cloudfront has cost me $0.00 for the last year. This is incidentally the best price.
My (single page) personal site is HTML+CSS (no JS) based on a template generated by ChatGPT because I don't give a crap. Trying to make something that works on a mobile device and desktop is beyond my meagre skills. This worked fine.
>AWS free tier. S3+cloudfront has cost me $0.00 for the last year. This is incidentally the best price.
I haven't tried this setup, but I'm using Cloudflare to serve my static sites for $0.00 as well. My mini rails apps I've down to $6/month VPS that I'm happy enough with as well for anything a bit spicy.
I would do that but I dislike Cloudflare because they wanted by DNS as well. I keep my DNS / CDN separate. Too many eggs in one basket otherwise.
I've never understood the whole centering a div meme.
width: 60%; // define your width as desired
margin: 0 auto;
Now go start your blog! I'm not sure if you are being serious about not understanding "the whole centering a div meme". Your example handles a trivial case, but does not address the whole of the problem.
As others have pointed out, vertical centering is often the problem being discussed (although difficulties with horizontal centering do happen). Anyone I know that has written any non-trivial web application has run into the situation where they spent way more time than they thought they should have to getting some element in a web application centered on the page the way they wanted it to be.
This article is a good example of the complexity, I think:
https://css-tricks.com/centering-css-complete-guide/
The author makes a decision tree, which illustrates the complexity fairly well, and then there's a conversation in the comments between the author and a reader about whether parts of the decision tree are correct.
CSS is extremely complicated. It's easy to get lost in the complexity, and it can be very frustrating when you know how you want something to look, but can't quite figure out how to get it to happen.
That's why the meme is so popular. LOTS of people who deal with CSS can relate.
Now center div with unknown height vertically :-)
And no cheating by using flexbox!
how do you center something on an axis with no limits placed to form a segments. That’s mathematically impossible unless you placed the limits first.
Powerful the Force is, young Padawan, as is the strength of your doubts. Release them you must.
<center> </center>
It's been working for the second century.
I'll still bust this out if it's some quick page that's not going to last long (like some kind of "service down for maintenance" page that's only going to be visible for a few minutes, or something)
It's "bad" but you know what? It fucking works, it's concise, and I can remember it no matter how long I go between writing HTML/CSS.
Hell I wouldn't be surprised if the paths it takes through a typical browser engine also makes it burn 5% or fewer as many cycles as CSS centering methods.
I did the same: https://domi.work/
And it's also ugly :)
I love this:
- Most of it is CSS, which when removed still produces a pretty functional website.
- Most of the CSS is just one (commented out) background image
- There are about 5 lines of java script, which seem to just exist to obfuscate your email.
Wow, I completely forgot about that image! Thank you for reminding me (it is now gone).
It was an experiment a while back and it was inline in order to keep it all in one file. Actually that made me realize, my site is dynamic: Because I edit this one html file live on the server to make changes, whoever loads my website repeatedly while I'm doing that is going to see changes live.
GitHub has free hosting.
GitHub has poor browsers backward compatibility. Considering it's owned by Microsoft, we should probably start counting the days until it ends up behind a login wall like LinkedIn.
If your budget isn't literally zero, avoid AWS and get a cheap VPS from Digital Ocean, Linode, Vultr, OVH, or Hetzner Cloud, IMO.
The problem with AWS is their extortionate egress fees which are about 50-100 times the market price.
What I'm doing for my site is similar, I just sprinkle 11ty on top for the static generation, and then publish on netlify pages.