Community Forums › Forums › Archived Forums › Design Tips and Tricks › Is all widget styling CSS related?
- This topic has 3 replies, 2 voices, and was last updated 5 years, 1 month ago by hello.sun.
-
AuthorPosts
-
March 28, 2019 at 10:15 pm #490342hello.sunMember
I made a mistake and "resolved" a recent topic I started, not knowing it closes the discussion to more comments. Lesson learned.
Previous topic:Widgets: how to edit and style them?
Does all styling to widgets happen in CSS? I think the answer is yes, but I'd like to get a confirmation.
I'm working with Academy Pro and now working to change the widget layout for specific areas. Going from showing columns to stacked widgets.
The code I found I think I need to focus on has been .widget-full and .widget-halves (style.css lines: 1281+), however not sure how to change the classes itself, or make a custom class (hmmm...):
/* Flexible Widgets --------------------------------------------- */ .flexible-widgets .wrap { max-width: 1280px; padding-bottom: 80px; padding-top: 80px; } .flexible-widgets .widget { float: left; margin-bottom: 40px; padding-left: 40px; padding-right: 40px; } .flexible-widgets .widget:last-of-type { margin-bottom: 0; } .flexible-widgets.widget-full .widget, .flexible-widgets.widget-halves.uneven .widget:last-of-type { width: 100%; } .flexible-widgets.widget-halves .widget { width: 50%; } .flexible-widgets.widget-thirds .widget { width: 33.33%; } .flexible-widgets.widget-halves .widget:nth-child(odd), .flexible-widgets.widget-thirds .widget:nth-child(3n+1) { clear: left; }
March 29, 2019 at 1:18 am #490345Victor FontModeratorAll styling on a website in general comes from CSS, not just for widgets.
CSS though could be generated in PHP and may not be available in style sheets.
For Genesis themes, CSS classes are added to widget code in PHP that can usually be found in front-page.php. If you want to use a custom class, you can add the custom class to the target widget here, but the class definition has to be in style-front.css.
BTW, if you make a typing mistake in PHP, you'll bring your site down. Don't use the WordPress editor to make changes. Use FTP and an editor in your local environment.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?March 29, 2019 at 1:24 am #490346Victor FontModeratorAlso, when you mark a post as resolved, I or another forum moderator closes the thread to further comments because the problem is solved.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?March 31, 2019 at 5:54 pm #490398hello.sunMemberI see, thank you!
BTW, if you make a typing mistake in PHP, you'll bring your site down. Don't use the WordPress editor to make changes. Use FTP and an editor in your local environment.
Also, when you mark a post as resolved, I or another forum moderator closes the thread to further comments because the problem is solved.
Thank you for letting me know about this.
-
AuthorPosts
- The topic ‘Is all widget styling CSS related?’ is closed to new replies.