#css tips
Explore tagged Tumblr posts
kitkatcodes · 1 year ago
Text
✧・゚: Customize your highlight color! :・゚✧
Tumblr media
I recently came across a blog where when I went to highlight some text I noticed it was a unique color!!! (」°ロ°)」
AND IT'S SO SIMPLE TO DO
all you do is go to your css file and add this:
::selection { background: <hexcolor> }
Enjoy!! ♡⸜(˶˃ ᵕ ˂˶)⸝♡
1K notes · View notes
izicodes · 11 months ago
Text
I learnt the 'vw' unit in CSS~!
% and rem/em units weren't working properly for the responsiveness so I search online for other units I could use and I came across vw and now I'm satisfied! Scales semi-smoothly~! 😏
Using vw means the font size is directly proportional to the width of the viewport.
You don't need to worry as much about setting breakpoints for different screen sizes. The font size adjusts automatically based on the viewport.
Hope this helps other people learning CSS and working on making their site responsive! I used the vw unit on the font-size, padding height and width of the elements! Might need to add it to the box-shadow property too? 🤔💭
85 notes · View notes
izicodes · 9 months ago
Text
Convert HTML to Image: A Step-by-Step Guide ✨
Tumblr media
Do you want to turn some HTML code you've made that's on your website and have a way to convert it into an image for you to save?
Well, look no further! I too wanted to do the same thing but funny enough, there weren't any straightforward tutorials out there that could show you how! After hours of searching, I finally discovered the solution~!
This is an old tutorial I made 🐼
Tumblr media
💛 Set your environment
Before we dive into the conversion process, I'll assume you already have your HTML code ready. What you want to learn is how to turn it into an image file. You should have a good grasp of HTML and JavaScript. For this tutorial, we'll use the following HTML code example:
Tumblr media
We won't include the CSS code, as it doesn't affect this tutorial. The JavaScript file (script.js) at the bottom of the body element is where we'll add the functionality for the conversion.
Your page should resemble the following:
Tumblr media
As you can see, the "Click me" button will handle the conversion. We aim to convert everything within the div.info-div into an image.
💛 Using the html2canvas JavaScript Library
The html2canvas library allows you to take screenshots of webpages and target specific elements on a screen. Here are the steps to include the library in your project:
The steps to put the library in your project:
Visit the html2canvas website for more information.
Copy the CDN link from here
Tumblr media
and include it in a script tag in your project's head tag in the HTML file:
Tumblr media
That's it for including the library on the HTML side. Now, let's move on to the JavaScript code.
💛 JavaScript Functionality
Here's the JavaScript code to handle the conversion:
Tumblr media
In this code, I want to turn the whole div.info-div into an image, I put it into a variable in const div = document.querySelector(".info-div");.
I also put the button into a variable in const button = document.querySelector("button");
I added a click event listener to the button so when the user clicks the button, it will follow the code inside of the event listener!
You can find similar code like this in the documentation of the html2canvas library:
Tumblr media
What is happening here is:
We add the div (or what the element we want to take an image of) into the html2canvas([element]).then((canvas)
Added the image file type url to a variable = const imageDataURL = canvas.toDataURL("image/png"); - You can replace the png to other image file types such as jpg, jpeg etc
Created an anchor/link tag, added the href attribute to imageDataURL
The download attribute is where we will give the default name to the image file, I added "dog.png"
Perform the click() function to the anchor tag so it starts to download the image we created
And that's it!
💛 The End
And that's it! You've successfully learned how to turn your HTML into an image. It's a great way to save and share your web content in a unique format.
Tumblr media
If you have any questions or need further clarification, please comfortable to ask. Enjoy converting your HTML into images! 💖🐼
Tumblr media
141 notes · View notes
xpc-web-dev · 2 years ago
Text
Websites to practice Front-End
(22/02/2023)
Today I wanted to share websites to practice your frontend skills.
Front-end is complicated for my head (ask me to solve an algorithm with structure while but not to center a div HUEHHUE).
BUT at the same time I love a well done and coded design/ui. That's why today I want to share resources to help you train
1- Front-End Practice
Tumblr media
They have 3 levels, beginner, intermediate and advanced. There's no "answer" so you can't copy the code, it's just you trial and error until you get to the template (which really is a website that exists)
Tumblr media
One thing I thought was really cool here was that it tells you what you're going to practice the most in the exercise, color palette and search features.
It's very interesting for a front-end not to be dependent on a tutorial, because from what I've seen in interviews, they ask you to make a layout and you won't be able to make one yourself if you don't learn to break down a single layout from the beginning and try and making mistakes until it's perfect.
2- DevChallenges
Tumblr media
I find the projects not only beautiful visually but also interesting to practice. Here you already have the solutions that other people recommend, but again I think it's best for us to try and make mistakes until we get similar.And it also sorts the levels.
Here an example:
Tumblr media
Cool huh? Well, I hope this helps someone who is looking for projects to practice with. We can invest a lot of time trying to make a layout, so having something ready I know helps a lot.
I wish you good studies and a great Wednesday, drink water.
293 notes · View notes
frownyalfred · 1 year ago
Text
the things we do for fics, I swear. I spent probably about 20 hours in the last month learning all about CSS and the limitations of text hover boxes and how they're not responsive unless you're in Java and now I have all this random, highly-specific knowledge about CSS tooltips floating around in my brain. I was a history major and I write smut for fun, like what am I doing here
74 notes · View notes
code-lab · 10 months ago
Text
Tumblr media
Scrollbar-width property
To define scrollbar thickness or to hide it, a good alternative to ::-webkit-scrollbar
Documentation
Compatibility
15 notes · View notes
akosuaexe · 9 months ago
Text
18.03.2024
Today was a decently normal Monday. My teachers informed me today that I might be getting an essay I completed a while ago and getting my science test results back soon.
After school, I tried to start the home page of the website I'm currently building Project.Spider and I would like to say that thanks to the help of Bing AI, ChatGPT and Visual Studio Code, I could finish one part.
Tumblr media Tumblr media
🎧- Shut up my mom's calling - Hotel Ugly
🌲- 3hrs
7 notes · View notes
sandycodes · 1 year ago
Text
day 1/100
Tumblr media
this is my first day of the 100 days of coding challenge :) im curious about website building and design and i thought html and css would be a good place to start. im following a course on udemy, so i've been learning some of the basics of html and text formatting, and im going to start the html basics course on sololearn so i can practice a little more <3
29 notes · View notes
thearsenicgarden · 2 years ago
Text
HOW TO ADD LINKS TO YOUR BIO 
Tumblr media
Paste the above code into your bio, replacing the link section with the full link and the text section with your desired text. Be sure not to leave a space when copying over.  
If it's breaking, or you're lost, check this post here.
*note: these links will only appear in your mobile/automatic theme. if you have a desktop theme with a custom description this method will still work.
46 notes · View notes
getbreaded · 1 year ago
Text
Finally installed node js and learned the basics of typescript. The goal is to develop and launch a website for our family business :)
Wish me luck! And if anyone has tips they're more than welcome!
13 notes · View notes
shahednasser · 2 years ago
Text
How to Lint Code and Prose in Documentation
An essential part of the documentation is being consistent. This includes both the written content and the code blocks.
This article covers the different methods and ways you can lint prose or content and code blocks to ensure it follows your style guide.
28 notes · View notes
izicodes · 2 years ago
Text
CSS Cheat Sheet | Resources ✨
Tumblr media
A CSS cheat sheet by Nick Schäferhoff - LINK
270 notes · View notes
crowcoding · 10 months ago
Text
HTML & CSS Comment Tips
One valuable thing I have learned when starting any project is to include comments on your pages to provide a more structured layout.
For example, in HTML files, comments can be made with <!-- --->; anything within that space won’t appear on the page or be read by the browser.
A good way to use this in a page is to outline your areas, like in the image below.
Tumblr media
Anywhere on your pages where you have a new section, you should use comments to outline what they are. This helps in a few ways. First, it increases readability for yourself and anyone else reading your code. Second, as your projects grow, doing this helps keep them organized. 
It’s easier to add to and edit when you can find the area where you want to make changes or add classes based on the comment tags rather than trying to narrow it down through many <div> tags. Third, it helps with remembering what you were doing.
The same principles apply to CSS files, although comments are left in a CSS file type with /*     */.
Tumblr media
Using comments to outline the different style groups you intend to use in your projects can help you find the parts you want to edit. In general, using comments is something everyone should do. They are very helpful in JavaScript and other languages when making notes about what a function does or should be doing. You can also leave yourself notes about what you were working on. 
2 notes · View notes
gnomeantics · 2 years ago
Text
thought i'd make a hideous website to go with my hideous css i love you all https://gnomeantics.000webhostapp.com/
7 notes · View notes
fookinstevienicks · 1 year ago
Text
okay so i updated my block trigger tags skin in response to certain fics surprising the absolute shit out of me today
i actually created a github repository and i'm moving all the skins i use over there slowly also if you look at it well just keep in mind that i'm a legal and art geek not a code geek idk shit about github i'm probably using it wrong but oh well idgaf
Block Trigger Tags Skin
5 notes · View notes
why-tap · 2 years ago
Text
Tumblr media
DID YOU KNOW? 🤔
10 notes · View notes