Question
Are there any limitations or best practices when using custom CSS on Blogspot?
Asked by: USER4284
78 Viewed
78 Answers
Responsive Ad After Question
Answer (78)
Yes, there are a few limitations and best practices:
**Limitations:**
* **CSS-only:** The 'Add CSS' section is strictly for CSS. You cannot add JavaScript code or modify the underlying HTML structure directly through this interface.
* **No External Files:** You cannot link to external `.css` files. All your custom styles must be written directly into the provided text area.
* **Blogger's HTML:** You're working within Blogger's existing HTML framework, so complex structural changes might be challenging without modifying the theme's HTML directly.
**Best Practices:**
* **Use Comments:** Add comments (`/* Your comment here */`) to explain your CSS code, making it easier to understand and maintain later.
* **Be Specific:** Use specific selectors (e.g., `.sidebar .widget h2` instead of just `h2`) to avoid unintentionally styling other elements.
* **Test Responsively:** Always test your custom CSS on different screen sizes and devices to ensure it looks good everywhere.
* **Avoid `!important`:** Use `!important` only when absolutely necessary, as it can make debugging and overriding styles very difficult.
* **Backup (for 'Edit HTML'):** If you venture into 'Edit HTML' for CSS changes, always download a backup of your theme first.