Support » Fixing WordPress » How do I align excerpt images on homepage?

  • Resolved Distiple

    (@distiple)


    I’ve managed to create excerpts for my hompepage that include thimbnail images, however they appear above the text instead of to the right, where I want it. I’ve gone over multiple articles and threads on the issue, but cannot for the life of me get it to work.

    I am currently adding the code pasted below to the style.css file of my child theme, but am probably doing it completely wrong. Help?

    .attachment-custom_thumb {
    float: right;
    margin-right: 0px;
    class: “alignright”
    }

Viewing 15 replies - 16 through 30 (of 46 total)
  • Thread Starter Distiple

    (@distiple)

    Ah, okay, well we’re just having a semantics difference – I’m not going to argue about it – I would use a standard child theme but you can do it however works best for you :). (Fair warning though, that you’ll likely get repeatedly questioned about it if you ask for CSS help here! )

    So the code I posted above should work fine – put it at the end of the style.css file that you have in the child theme:

    .attachment-custom_thumb {
       float: right;
       margin: 0 0 10px 10px;
    }

    Then clear any caches in your site or browser.

    Thread Starter Distiple

    (@distiple)

    Im sorry, I didnt mean to argue. I dont believe i know enough to even have an opinion 🙂

    I tried your suggestion again, but no luck. Other changes are showing up, so i dont believe this is a caching issue.

    This is a problem im having with various solutions im finding, and ive posted about it here: http://wordpress.org/support/topic/which-code-is-right-for-me?replies=5

    I’d guess that your caching is the problem – no code is showing up in the stylesheet. I’d suggest deactivating that plugin while you are working on the site.

    <!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/
    
    Page Caching using disk: basic
    Object Caching 2400/2641 objects using disk: basic
    
     Served from: wordsandmusic.me @ 2013-04-06 05:19:16 by W3 Total Cache -->

    Thread Starter Distiple

    (@distiple)

    I am using developer mode in the plugin, and am testing things on a test child theme. I’ve now updated the current child theme to include the new code so you can take a look.

    Caching can be weird…

    I didn’t mean you were arguing – that was a poor choice of words – sorry – and I TOTALLY understand how frustrating this can be when it seems like things just are not working and we can’t figure out why right away. No worries :).

    Okay, not caching – And here’s the problems:

    http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwordsandmusic.me%2F&profile=css3&usermedium=all&warning=1&vextwarning=&lang=en

    You have two CSS syntax errors in the stylesheet – find the extra bracket right after this:

    /* =Content -------------------------------------------------------------- */ }

    and then you need a bracket right above the new styles – so that the new style is not inside the print styles…it should look like this:

    .home .sticky {
    		border: none;
    	}
    }
            .attachment-custom_thumb {
             float: right;
             margin: 0 0 10px 10px;
             }

    these kinds of things are one big reason why copying all the styles makes it harder – I had to comb through a bunch of code to find them…

    Thread Starter Distiple

    (@distiple)

    im pretty sure i found both errors and fixed them, but still no joy.

    I havent made any changes to the css id like to keep, so i also copied the css file from the parent theme and simply added the code, but for some reason kept getting errors.

    Thread Starter Distiple

    (@distiple)

    and thanks for the effort. i now remembered why i didnt use the import command – i had no idea how to add any css changes in the correct way, and thought it would simply be easier to use the entire code.

    I see the same errors so something did not update…

    Thread Starter Distiple

    (@distiple)

    working on the test theme 🙂 I cant update my current code since i replaced the css with the parent themes css and cant seem to add the code without getting an error. This error points to my loop.php file, but replacing the css file is what fixes it.

    What is the error? CSS isn’t really related to a PHP file in that way.

    Thread Starter Distiple

    (@distiple)

    Pretty sure it was because i was stupidly not updating the name variables.

    Things are now getting a bit weirder. I created a new css with the import command as you suggested, and surprise! images are aligned. However, when i copied this file to my current theme (instead of my test theme where it worked) images were not aligned. Even it is the same file in a folder in the same directory.

    No idea!

    You may have other errors – try the validator…http://jigsaw.w3.org/css-validator/

    Thread Starter Distiple

    (@distiple)

    The css file currently includes nothing but the import command, which is working.

    Can you explain to me how i should add code to a css file using the import command. This is my code right now:/*
    Theme Name: Twenty Ten Bastard Test
    Description: Child theme for the twentytrn theme
    Author: YG TEST
    Template: twentyten
    */

    @import url(“../twentyten/style.css”);

    And i would like to this to it: .menu ul { float:right; padding-right:20px;}

Viewing 15 replies - 16 through 30 (of 46 total)
  • The topic ‘How do I align excerpt images on homepage?’ is closed to new replies.