Hack Forums
Need help with style.css - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Webmasters (https://hackforums.net/forumdisplay.php?fid=141)
+---- Forum: Website Construction (https://hackforums.net/forumdisplay.php?fid=50)
+---- Thread: Need help with style.css (/showthread.php?tid=5648948)



Need help with style.css - Dotexe - Jun 17, 2017

Hello people, recently started to study web dev, i tried to do something but im confused, basically what i want is when im on login/register page to use style.css
but after all when im in index.php to use a different style. How to do that ? i tried to create another css but with different name and when im passing through login to use diffstyle.css (example name) but nothing works. I'm really new into this so it might sounds stupid :D


* - Nachfolger - Jun 17, 2017

what?

Index.html
Code
<head>
<link rel='stylesheet' type='text/css' href='diffstyle.css'>
</head>

Login.html
Code
<head>
<link rel='stylesheet' type='text/css' href='login.css'>
</head>

It's as simple as that.


* - Dotexe - Jun 17, 2017

Already tried that and it didnt work at all, even mentioned it :D im looking for other solutions( if there's any )


* - Nachfolger - Jun 17, 2017

(Jun 17, 2017 07:03 AM)Dotexe1 Wrote:  Already tried that and it didnt work at all, even mentioned it :D im looking for other solutions( if there's any )
No bud, this is exactly how you do it. How did it not work? Post your code. If you're not seeing changes, it's likely cached. Add a query to the link.

Code
<head>
<link rel='stylesheet' type='text/css' href='diffstyle.css?v=0.01'>
</head>



* - Dotexe - Jun 17, 2017

(Jun 17, 2017 07:20 AM)Nachfolger Wrote:  No bud, this is exactly how you do it. How did it not work? Post your code. If you're not seeing changes, it's likely cached. Add a query to the link.

Code
<head>
<link rel='stylesheet' type='text/css' href='diffstyle.css?v=0.01'>
</head>

Oh wow, now it works man idk, i tried to clear the cache even ctrl + F5 but its probably from xampp, thank you once again buddy !