• Resolved Blaque

    (@blaque)


    Thanks for a great plugin that allows editors to change the content of widgets! I am experiencing a layout problem and I am wondering if you might have any suggestions for solutions.

    My Content Blocks contain text only, but the title and the text content are not aligned. While the title is properly aligned, the text content is shifted to the left and the right margin also seem to be narrower. This problem does not occur when I use the standard WordPress text widget, see link. On this picture the top widget is the text widget and the bottom one the Content Block widget

    https://www.2shared.com/photo/ubS40E6S/text-custompost-widget.html

    Any idea of what the problem is?

Viewing 6 replies - 1 through 6 (of 6 total)
  • It’s probably a padding issue, easily fixed with css. But can’t trouble-shoot from an image.

    This is indeed a CSS issue. I would recommend installing the FireBug Add on for Firefox to find out which CSS rules are causing this.

    Thread Starter Blaque

    (@blaque)

    Is there a way to change how the Content Blocks are displayed, i.e. specify CSS category?

    Would appreciate any guidance!

    Yes you can completely change the wasy the Content Blocks are displayed using CSS. Each content block has a unique css ID based on the post type ID (ie. custom_post_widget-3), and all content blocks share the class widget_custom_post_widget.

    This means that you can style them either individually via the ID, or create a generic style for all content blocks based in the class.

    Thread Starter Blaque

    (@blaque)

    Thanks, Johan, for your help. I might be a complete idiot, but where do I find the CSS file containing the widget_custom_post_widget class? In other words, how do I style the content block posts individually or class-wise?

    You will have to add these classes and/or id’s to the stylesheet that comes with the theme you have installed. You can find this stylesheet here: /wp-content/themes/your-theme-name/style.css.

    This is an example of a class you can use (replace the number 3 with the ID of the custom post you would like to style, see the html source) to add a border around a specific content block:

    #custom_post_widget-3 { border: 1px solid #000; }

    If you would like to generate a style that affects all content blocks you can use the class widget_custom_post_widget. For example, if you would like the font color in all the content blocks to be dark gray you can use this code:

    .widget_custom_post_widget { color: #333; }

    Good luck!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Custom Post Widget] Title and text content not aligned’ is closed to new replies.