How to embed custom CSS code on Hostinger
You can embed custom CSS on Hostinger through your website's admin panel (WordPress/CMS), by editing theme files via File Manager, or by creating a separate CSS file and linking it to your HTML. The method depends on your website platform and technical preferences.
Prerequisites
- Active Hostinger hosting account
- Basic understanding of CSS
- Access to your website's admin panel or file manager
Step-by-Step Instructions
Access your Hostinger control panel
Choose your CSS embedding method
Method 1: WordPress admin panel (recommended)
Method 2: Edit theme files directly
public_html/wp-content/themes/your-theme-name/. Edit the style.css file by clicking the Edit button and adding your custom CSS at the bottom.Method 3: Create a separate CSS file
custom.css. Add your CSS code to this file, then link it in your HTML head section using <link rel="stylesheet" href="custom.css">.Method 4: Add inline CSS to HTML
<style> tags in the head section, or use inline styles with the style attribute directly on HTML elements.Test your CSS changes
Optimize and validate your CSS
Common Issues & Troubleshooting
CSS changes not appearing on the website
Clear your browser cache with Ctrl+F5 and check if your website has caching enabled in the Hostinger control panel. Disable caching temporarily to test changes.
CSS file not loading or 404 error
Verify the file path in your <link> tag is correct and the CSS file exists in the specified directory. Check file permissions are set to 644 in File Manager.
Custom CSS being overridden
Increase CSS specificity by using more specific selectors or add !important to your CSS rules. Check if other stylesheets are loading after your custom CSS.
File Manager showing permission errors
Ensure you have proper file permissions. Right-click the file in File Manager, select Permissions, and set appropriate permissions (typically 644 for CSS files).