CSS font, spacing, and text area size

  • Unknown's avatar

    Hi, I’m trying to change the following in the Dusk to Dawn theme: Font in main body text to Tahoma, decrease the line spacing, and widen the text area while narrowing the sidebar. I’m not seeing any issues with the code, but nothing seems to be changing. Are these non-customizable? Thank you!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    In the Dusk to Dawn theme, you can set a font stack and decrease line spacing with this:

    article {
        font-family: Tahoma, Arial,Helvetica, sans-serif;
        line-height: 1.5em;
    }

    This will widen the text area and narrow the sidebar, however, the background for that theme is set using an image, and so the image would also need to be re-created, uploaded to your media library and replaced by updating NEW_BG_IMAGE_URL in the example below.

    #main {
         background: url(NEW_BG_IMAGE_URL) repeat-y 0 0;
    }
    
    #main .widget-area {
         width: 180px;
    }
    
    #primary {
         margin-left: -250px;
    }
    
    #content {
         margin-left: 250px;
    }

    Here’s the original image which you can download, adjust, and re-upload: http://s1.wp.com/wp-content/themes/pub/dusk-to-dawn/images/page.gif

    Or if you don’t want to work on the image, you could override it with a color just for the main content area

    article {
         background-color: #EEEAE8;
    }
  • Unknown's avatar
    lucasgfreeman · Member ·

    I didn’t see the image before, but resizing it resolved that issue.

    I’m having margin/padding issues around the individual post headers, footers, and images now. I’m somewhat new to css, and can’t find the code to fix those, even with Firebug. I’ll keep looking.

    Thank you for your help!

  • Unknown's avatar

    We can probably help you look. What are margins/padding are you trying to change?

  • Unknown's avatar
    lucasgfreeman · Member ·

    I’m trying to shrink the gap between the headers and the body text. I think I’ve resolved the footers. Also, I had borders around my images in another theme, but those borders have disappeared and the caption text is now just floating in the text field (I’ll have to change the caption text color once I get the border back, I presume).

    Any help would be greatly appreciated!

  • Unknown's avatar
    lucasgfreeman · Member ·

    h1, h2, h3, h4, h5, h6 {
    clear: both;
    line-height: 22px;
    margin-bottom: 22px;
    }

    p, dd, pre {
    margin-bottom: 22px;

    }

    I’ve been trying to decrease the margin-bottoms and line-height (a 5-pixel margin would be great), which is working in Firebug, but not in WordPress.

  • Unknown's avatar

    Don’t do it on the main h elements CSS, do it on the “entry-header class.

    .entry-header {
    margin-bottom: 22px;
    }
  • Unknown's avatar
    lucasgfreeman · Member ·

    Thank you. Do you have any tips for the footer margin? This code isn’t working for me:

    footer.entry-meta {
    width:474px;
    padding:2px 5px 10px 0;
    }

    .right-sidebar footer.entry-meta {
    padding:10px;
    }

  • Unknown's avatar
    lucasgfreeman · Member ·

    Maybe the “footer” isn’t what I think it is. I’m referring to the space around the “posted in” and “comments” section at the bottom of the posts.

  • Unknown's avatar

    Most of the gap between is the paragraph spacing for normal paragraphs, and you can’t really edit that as it will change the paragraph spacing everywhere on the site.

    Use a negative top margin in footer.entry-meta such as below.

    footer.entry-meta {
    margin-top: -20px;
    }

    On the border and image background here is something to work with:

    `.wp-caption {
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
    padding-top: 5px;

  • Unknown's avatar

    Forgot one of my code tags and an ending bracket

    .wp-caption {
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
    padding-top: 5px;
    }
  • Unknown's avatar
    lucasgfreeman · Member ·

    Thanks for your help again. The negative top margin didn’t work though. This is just getting bizarre. By changing the padding code here:

    footer.entry-meta {
    padding: 1px 10px 0 11px;
    width: 474px;
    }

    I can bring the footer closer to the text in Firebug, but it’s not working in WordPress. Still can’t bring the footer closer to the bottom of the post though. I might even change themes if I can’t figure this out. Oh well. Thanks again.

  • Unknown's avatar
    lucasgfreeman · Member ·

    Found it. Had to change the padding in h.entry and and line-height in
    .entry-meta.

    Thank you again.

  • Unknown's avatar

    Something in the rest of the existing CSS is overriding it and that isn’t showing up in the Firebug. Add the “!important attribute to it like the following and then adjust the negative value as desired.

    footer.entry-meta {
    margin-top: -30px !important;
    }
  • Unknown's avatar

    I seriously don’t recommend doing it that way, but whatever.

  • Unknown's avatar

    Actually I’m going to take that back as looking at what you did vs what I was thinking you wanted on the post footer stuff, I don’t think I understood what you were wanting.

    On the post header/title, I don’t even see the selector you reference, so I am perhaps in a parallel universe or something.

  • Unknown's avatar
    lucasgfreeman · Member ·

    Sorry, I might not have worded it correctly. I’m not sure what most things in CSS are yet. But I did get it aligned finally. Just had to keep playing with margin and padding values.

    I got the caption working too. Huge thanks!

  • Unknown's avatar
  • The topic ‘CSS font, spacing, and text area size’ is closed to new replies.