« Web, HTML, Tech Forum

How to make your userpage styles not be messy

There's a little trick for not having a mess with user styling code using @import 


Method 1: The Fast Way

Register for GitHub and create a repository, named, for example: SpaceHey style. And you need to make a .css file, named, for example: userstyle.css. You will put all the code you want for your userpage, obviously adhering to the allowed HTML tags and other rule stuff, now for this to work, you need to enable GitHub Pages

In SpaceHey, in your About Me, you need to put this, and obviously change the stuff I put in


<style>@import url('https://username.github.io/mystyle/spacehey/userstyle.css');.hideobj{ visibility: hidden; height: 20px; width: 0%; }</style>


finish!


Method 2: The webmaster way

In this, you need to have a web server, you can buy hosting from a lot of companies, but if you want, use some free one like InfinityFree


Set up the website as normal, create in your htdocs a folder called "spacehey", and then create a file called "userstyle.css", put the code that you want, and save it.


In SpaceHey, in your about me put this


<style>@import url('https://myweb.site/spacehey/userstyle.css');.hideobj{ visibility: hidden; height: 20px; width: 0%; }</style>


And you are ready


Considerations

If you want to edit the code, you will last longer than just editing it from your about me, but at least, you will have that beautiful code markup 


And is known that there will be a delay when loading the code


The End


Report Topic

0 Replies