How to add a background color in blogposts?

Discussion in 'WordPress' started by Arkserver, Aug 17, 2008.

  1. #1
    My blogposts currently looks like that one on the picture to the left and i want to add a border and background color to it like the example to the right. Does anyone know what i should edit in the index template to do this? Im not really a php coder so i have no clue how although i tried. My site is www.engineeringserver.com

    [​IMG]
    ps i'm not sure if this is the right board but since most wordpress users on the board come here i think this is the best place to ask.
     
    Arkserver, Aug 17, 2008 IP
  2. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I don't know what colors they are so I'll use the footer-post background and border. Try changing this:
    
    /* Design  Post
    ********************* */
    .post {
    	margin-bottom: 15px;
    	border-bottom: 1px solid #95AABC;
    	padding-bottom: 5px;
    }
    
    Code (markup):
    to this:
    
    /* Design  Post
    ********************* */
    .post {
    	background: #F4F6F8;
    	border: 1px solid #95AABC;
    	margin-bottom: 15px;
    	padding-bottom: 5px;
    }
    
    Code (markup):
    Also, you'll probably have to adjust the padding and margins to get it looking right.
     
    Cash Nebula, Aug 17, 2008 IP
    Arkserver likes this.
  3. Arkserver

    Arkserver Banned

    Messages:
    2,533
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks a lot! rep added :)
     
    Arkserver, Aug 18, 2008 IP
  4. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #4
    That looks good. Thanks for the rep. :)
     
    Cash Nebula, Aug 18, 2008 IP
  5. Arkserver

    Arkserver Banned

    Messages:
    2,533
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I've one more questions ( i hope)
    How do i make the codebox a little bit smaller so that it fits right in the larger frame? I'm guessing i need to do something with the padding but im not that good with it.

    screenshot:
    [​IMG]

    Thanks
     
    Arkserver, Aug 20, 2008 IP
  6. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I think those widths are set by the plugin CSS (wp-content/plugins/ig_syntax_hilite/css/syntax_hilite_css.css)

    Try changing the non-list widths to these:
    
    /* change this line to set the width of code box */
    .syntax_hilite { width:469px; }
    
    /* change this line to set the width of plain text bar above code box */
    .igBar { width:480px; }
    
    Code (markup):
     
    Cash Nebula, Aug 20, 2008 IP
  7. Arkserver

    Arkserver Banned

    Messages:
    2,533
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thanks :) now my code can be displayed without overlapping the frame/div. rep++ given. Cheers!
     
    Arkserver, Aug 20, 2008 IP
  8. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Cheers Arkserver! :)

    I'll check my posts a bit more carefully next time :eek:
     
    Cash Nebula, Aug 20, 2008 IP