wordpress theme modifications

17 replies
Hi Warriors,

Trying to make some mods to my wordpress theme and I can't figure it out... Here's what I'd like to do-

1) have the content of the page float left instead of centered (like the blog header title, posts, footer, etc.)

2) I have a picture on the page set as the background that I don't want to repeat... that's set just fine, but the background color is white by default and I can't figure out how to change the color to black or something else.

Thanks for any help!
Rebecca
#modifications #theme #wordpress
  • Your question is too broad Rebecca, as it's a matter of digging into the CSS coding of the theme (which is different for every respective theme).
    {{ DiscussionBoard.errors[2260619].message }}
  • Profile picture of the author VegasGreg
    Those adjustments can be made in your CSS Stylesheet. As mentioned, depending on your theme, the sections needed to be adjusted could be in various places of the stylesheet.
    Signature

    Greg Schueler - Wordpress Fanatic... Living The Offline Marketing Dream...

    {{ DiscussionBoard.errors[2260667].message }}
    • Profile picture of the author Myles Sinclair
      Use Firefox and install an addon called Firebug. Firebug will reveal every aspect of CSS on the page you are viewing. Removes the guess work when editing a style sheet.

      Hope this helps.

      Myles
      {{ DiscussionBoard.errors[2260715].message }}
  • I see what you mean.... that's what I've been trying to figure out... where in the theme I need to make the change. I've attached the text file with the css code in it. Thanks!
    {{ DiscussionBoard.errors[2260718].message }}
    • Profile picture of the author Rashell
      try changing the body section to

      body {
      font-size: 62.5%; /* Resets 1em to 10px */
      font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
      background: url(images/background.jpg) no-repeat;
      color: 000;
      text-align: left;
      }

      I've only changed the last 2 text lines
      color: 000; (making the background color black)
      text-align: left;

      Rashell
      {{ DiscussionBoard.errors[2260783].message }}
  • Hi Rashell,

    Thanks for the suggestion... it didn't do the trick though.... wonder what else it could be??

    Rebecca
    {{ DiscussionBoard.errors[2260811].message }}
    • Profile picture of the author Jill Carpenter
      If you don't know css, you may be better off searching for a new theme that is closer to the layout you are looking for.
      Signature

      "May I have ten thousand marbles, please?"

      {{ DiscussionBoard.errors[2260834].message }}
  • this theme was the closest i could find to meet my criteria....
    {{ DiscussionBoard.errors[2261054].message }}
  • To change the background color of the body:

    Code:
    /* Begin Typography & Colors */
    body {
    	font-size: 62.5%; /* Resets 1em to 10px */
    	font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
    	background: url(images/background.jpg) no-repeat;
    	background-color: #000; /* ADD THIS LINE */
    	color: fff;
    	text-align: center;
    	}
    To make the content align left instead of centered, search for and delete the following code in your CSS file:

    Code:
    text-align: center;
    (WARNING: You should make a backup of your stylesheet and delete one line of code at a time to ensure the effect is what you want. I can't see your website, so it's hard for me to tell you which line to delete.)

    Just to give you an example:

    Code:
    h1 {
    	font-size: 4em;
    	text-align: center; /* DELETE THIS LINE AND YOUR H1 TEXT SHOULD ALIGN LEFT */
    	}
    {{ DiscussionBoard.errors[2261069].message }}
    • Well, I got the color changed to black... THANK YOU!

      But the content is still centered

      I deleted all the "text-align: center;" lines but still no change.

      Strange!

      Originally Posted by Chris Landrum View Post

      To change the background color of the body:

      Code:
      /* Begin Typography & Colors */
      body {
      	font-size: 62.5%; /* Resets 1em to 10px */
      	font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
      	background: url(images/background.jpg) no-repeat;
      	background-color: #000; /* ADD THIS LINE */
      	color: fff;
      	text-align: center;
      	}
      To make the content align left instead of centered, search for and delete the following code in your CSS file:

      Code:
      text-align: center;
      (WARNING: You should make a backup of your stylesheet and delete one line of code at a time to ensure the effect is what you want. I can't see your website, so it's hard for me to tell you which line to delete.)

      Just to give you an example:

      Code:
      h1 {
      	font-size: 4em;
      	text-align: center; /* DELETE THIS LINE AND YOUR H1 TEXT SHOULD ALIGN LEFT */
      	}
      {{ DiscussionBoard.errors[2261128].message }}
    • Profile picture of the author AndyBeard
      My understanding is that you want the whole page to be left aligned, not necessarily the content within it.

      Providing just the CSS is no guarantee that this will work, as the CSS controls the DIVs however...

      This seems to be the code that is the parent div

      PHP Code:
      #page {
          
      background-colorwhite;
          
      margin20px auto;
          
      padding0;
          
      width760px;
          
      border1px solid #959596;
          

      The important part of that is the margin

      If you change it to

      margin: 20px auto 20px 20px;

      The whole page should now end up on the left hand side of the browser window.

      The order is always top right bottom left

      You may also have to modify the CSS for the footer

      PHP Code:
      #footer {
          
      padding0;
          
      margin0 auto;
          
      width760px;
          
      clearboth;
          } 
      That might be nested within the page, if it is there is no need to modify it.
      However there is a high chance it isn't.
      If it isn't then you would change the margin to exaxtly what you have for the page above.
      {{ DiscussionBoard.errors[2261157].message }}
      • WOW!!

        THAT DID IT THANK YOU!!!

        Originally Posted by AndyBeard View Post

        My understanding is that you want the whole page to be left aligned, not necessarily the content within it.

        Providing just the CSS is no guarantee that this will work, as the CSS controls the DIVs however...

        This seems to be the code that is the parent div

        PHP Code:
        #page {
            
        background-colorwhite;
            
        margin20px auto;
            
        padding0;
            
        width760px;
            
        border1px solid #959596;
            

        The important part of that is the margin

        If you change it to

        margin: 20px auto 20px 20px;

        The whole page should now end up on the left hand side of the browser window.

        The order is always top right bottom left

        You may also have to modify the CSS for the footer

        PHP Code:
        #footer {
            
        padding0;
            
        margin0 auto;
            
        width760px;
            
        clearboth;
            } 
        That might be nested within the page, if it is there is no need to modify it.
        However there is a high chance it isn't.
        If it isn't then you would change the margin to exaxtly what you have for the page above.
        {{ DiscussionBoard.errors[2261198].message }}
  • I just found in the header.php file, the last line of code is:


    <table width="800" align="center"><tr><td valign="top"><br /><br />


    So, I took out the align="center" but still no change. :/
    {{ DiscussionBoard.errors[2261151].message }}
  • Did you delete the "text-align: center;" from the body?

    Code:
    /* Begin Typography & Colors */
    body {
    	font-size: 62.5%; /* Resets 1em to 10px */
    	font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
    	background: url(images/background.jpg) no-repeat;
    	background-color: #000;
    	color: fff;
    	text-align: center; /* DID YOU DELETE THIS LINE? */
    	}
    {{ DiscussionBoard.errors[2261152].message }}
  • Profile picture of the author bhopkins
    Without seeing the site this is hard to guess, but you likely have a div tag that is wrapping all your content. Find that in your theme and then you will know which class or id in your style sheet that needs to be changed.

    A good way to figure this stuff out is to download the Firebug plugin for Firefox and then you use it to figure out which element you are looking at. Saves a bunch of time.
    Signature

    Bruce

    {{ DiscussionBoard.errors[2261164].message }}
  • Now.... I need another change!! Sorry :/

    I need to get the content width smaller or even more sitting left. I can't figure out what's keeping it pushed out. I need it over to the left like another 1/2 inch and the width of the blue transparent block section smaller.

    Any ideas??
    {{ DiscussionBoard.errors[2261263].message }}
  • Profile picture of the author AndyBeard
    Well I deliberately left 20px in there on the left which could be removed

    20px auto 20px 0px;

    Remember to change at the bottom as well

    Unfortunately this is like the kids party game pinning a tail on a donkey with a blindfold.

    If you need to change the width a whole load of things will need to be changed in relation to the change in the parent div
    {{ DiscussionBoard.errors[2261403].message }}

Trending Topics