0

i was forced to migrate from a theme and want to make the new one look similar. i couldnt find anything on google, so i thought if i ask here perhaps in will help me and others in the future.

for example, a box around all blog posts and widgets on the front page.

i tried this

`{ -moz-box-sizing: border-box;
   -webkit-box-sizing: border-box; 
   -ms-box-sizing: border-box; 
   box-sizing: border-box; }`

but in all honesty i dont even know what it does. it was just the only answer on google that looked similar - and it didnt do anything to my site.

1
  • Share your wordpress URL and Ill give you some help.
    – Greg L
    Commented Feb 3, 2014 at 17:29

2 Answers 2

1

thanks very much Nico. if anyone has the exact same problem, adding this code into the child theme worked for me:

article {
 border: 1px solid #d4d4d4;
    }

.widget-container {
 border: 1px solid #d4d4d4;
    }
1
  • this code adds a border on all pages. i'll work out how to add one on just the front page tonight and update it. Commented Feb 5, 2014 at 6:58
1

Like your tags show, you know, that you are working with CSS there. This line of css is switching your page elements to border-box (which is a good thing). This will add the padding and border to element's width (http://css-tricks.com/box-sizing/)

If you want to add a border to certain elements, you should know how to identify these elements. You will find class attributes in the HTML of your blog (for example <div class="posting"> ... </div>.

You could know add this css, to add a red border to all divs withclass="posting"

.posting
{
  border: 1px solid red;
}

Or if you dare, you could add a border to everything.. But i don't think you really want that

*
{
    border: 1px solid red;
}
1
  • thanks very much. if anyone has the exact same problem adding this code into the child theme worked for me: ' article { border: 1px solid #d4d4d4; } .widget-container { border: 1px solid #d4d4d4; } ' Commented Feb 3, 2014 at 18:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.