Title: Customizing a Theme and basic CSS is not working
Last modified: December 19, 2018

---

# Customizing a Theme and basic CSS is not working

 *  Resolved [stxphxnie](https://wordpress.org/support/users/stxphxnie/)
 * (@stxphxnie)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/customizing-a-theme-and-basic-css-is-not-working/)
 * I’ve begun learning how to create my own custom themes, I understand the basics
   that you need to know, (wp_head and wp_footer and some other functions, using
   the functions.php to pull in the stylesheet, etc.) and I have a local server 
   set up which is where I’m practicing so I can only upload my code here to demonstrate(
   unfortunately I don’t yet have it online)
 * I’m trying to create a basic theme for a static landing page that just says “
   COMING SOON” in the center of the page, with a border around it, seems pretty
   straightforward to code, right?
    I haven’t gone too far into making my theme 
   work with the WordPress dashboard, so I’m just writing the “coming soon” text
   into my index.php file in the body tag, around h1 tags inside of a div tag with
   the class “cm-box”. I haven’t set up any other template than the index.php.
 * Essentially while I try to use padding, borders, and margins, the padding and
   the margin is only applying to the top and the bottom, and the border around 
   my text is stretching out to the edge of the page, rather than wrapping itself
   around my text.
 * I’ll copy and paste the code from my stylesheet below, I’m struggling to figure
   out what it is that I need to change in order to fix this problem; If someone
   could take a look at it and spot the problem that would be a great help. thanks.
 * P.S. You can check out the website where my new custom theme is going to be uploaded,
   if you like: stxph.com
 * Code:
    * { margin: 0; padding: 0; }
 * body {
    background-color: #B20000; margin: 0;
 * color: #ffb094;
    font-family: Arial, sans-serif; }
 * .cm-box {
    border: 5px #ff6d38 solid; padding: 10px; margin: 50% auto; }
 * .cm-box h1 {
    text-transform: uppercase; font-size: 8vw; text-align: center; }

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [7 years, 4 months ago](https://wordpress.org/support/topic/customizing-a-theme-and-basic-css-is-not-working/#post-11005301)
 * I don’t think you have an element on the page with the class of “cm-box”
 *  Thread Starter [stxphxnie](https://wordpress.org/support/users/stxphxnie/)
 * (@stxphxnie)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/customizing-a-theme-and-basic-css-is-not-working/#post-11005326)
 * [@anevins](https://wordpress.org/support/users/anevins/) Sorry, but I don’t get
   you. I wrapped the text in a dev tag with the class.
 * It’s working for the most part, for instance where I have margin 50%, it moves
   the text box down the page by 50% but it doesn’t push it in on the sides.
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [7 years, 4 months ago](https://wordpress.org/support/topic/customizing-a-theme-and-basic-css-is-not-working/#post-11005331)
 * Where did you wrap the element in the div tag? Because it’s not coming up on 
   the page. Try looking for it. Right click on your page and press “View source”
   and search for “cm-box”
 *  Thread Starter [stxphxnie](https://wordpress.org/support/users/stxphxnie/)
 * (@stxphxnie)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/customizing-a-theme-and-basic-css-is-not-working/#post-11007630)
 * I figured out how to solve the issue. Borders will automatically stretch to the
   edge of the margin on a block element, whereas I wanted my border to wrap right
   around my text to create a box.
 * I was missing the display: inline element in my stylesheet for the class.
    This
   website helped me: [http://jsfiddle.net/jonathon/XGRwy/1/](http://jsfiddle.net/jonathon/XGRwy/1/)
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [7 years, 4 months ago](https://wordpress.org/support/topic/customizing-a-theme-and-basic-css-is-not-working/#post-11007658)
 * Did you link to the wrong page in your original post? There’s still no borders
   around your “Coming soon” text: [http://www.stxph.com/](http://www.stxph.com/)

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Customizing a Theme and basic CSS is not working’ is closed to new replies.

## Tags

 * [Coding](https://wordpress.org/support/topic-tag/coding/)
 * [css](https://wordpress.org/support/topic-tag/css/)
 * [Custom Themes](https://wordpress.org/support/topic-tag/custom-themes/)
 * [custome theme](https://wordpress.org/support/topic-tag/custome-theme/)
 * [Stylesheet](https://wordpress.org/support/topic-tag/stylesheet/)
 * [Themes](https://wordpress.org/support/topic-tag/themes/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/customizing-a-theme-and-basic-css-is-not-working/#post-11007658)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
