Title: HTML Text Code
Last modified: August 22, 2016

---

# HTML Text Code

 *  [-Andreas](https://wordpress.org/support/users/-andreas/)
 * (@-andreas)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/html-text-code/)
 * Hello,
 * Could someone help me with a bit of HTML Code. I’m new at this, so I got no idea
   how it works. I’ve already tried to search around and use codes snippets found
   on the net but they never work fully.
 * Here’s what I need:
    A box with some text. The box needs to be 100×63 px. It 
   has to be filled with a color. Some of the text needs to be a specific color 
   + size. I’d really appreciate if someone could help me out here.
 * /Andreas

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

 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/html-text-code/#post-5700968)
 * You’ll need HTML and CSS – CSS can go in a child theme or custom CSS option or
   plugin:
 * HTML:
 *     ```
       <div class="mybox">
          PUT YOUR CONTENT IN HERE
       </div>
       ```
   
 * CSS:
 *     ```
       .mybox {
          width: 100px;
          height: 63px;
          background-color: blue;
          color: red;
          font-size: 10px;
       }
       ```
   
 * This may be helpful too:
 * [http://www.w3schools.com/css/css_boxmodel.asp](http://www.w3schools.com/css/css_boxmodel.asp)
 *  Thread Starter [-Andreas](https://wordpress.org/support/users/-andreas/)
 * (@-andreas)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/html-text-code/#post-5700971)
 * Yeah this works, thanks.
    Two problems though. How do I make the text centered
   in the box, and why do my box skip down onto the next line? Anyway that I can
   force it to stay after a picture I’ve included like this:
 * `<img src="http://www.myside.com/wp-content/uploads/2015/01/random.png" alt=""/
   ><div class="mybox"><font size="5" color="#ffffff">test</font>/test2</div>`
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/html-text-code/#post-5700973)
 * Add to the CSS:
 *     ```
       text-align: center;
       ```
   
 * Can’t see the image – see if adding this to CSS does what you want:
 *     ```
       clear: none;
       ```
   
 *  Thread Starter [-Andreas](https://wordpress.org/support/users/-andreas/)
 * (@-andreas)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/html-text-code/#post-5700976)
 * The text is now centered horizontally, but I need it to be vertically as well
   if that’s possible. So it completely in the center.
    Also clear: none; didn’t
   help. Anywhere I can send you a private login?
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/html-text-code/#post-5700981)
 * No sorry, we only offer help here and please don’t give login info to anyone 
   you don’t know! Just a bad idea security wise.
 * See:
 * [http://www.w3schools.com/cssref/pr_pos_vertical-align.asp](http://www.w3schools.com/cssref/pr_pos_vertical-align.asp)
 *  Thread Starter [-Andreas](https://wordpress.org/support/users/-andreas/)
 * (@-andreas)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/html-text-code/#post-5700984)
 * Oh I wasn’t going to give adminuser, just a regular as the site is locked for
   everyone else at the moment.
    —
 * Anyway, this code doesn’t seem to affect anything for some reason.
 * `vertical-align:-25px;`
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/html-text-code/#post-5701001)
 * Because that’s not a proper value for that CSS attribute – read this again:
 * [http://www.w3schools.com/cssref/pr_pos_vertical-align.asp](http://www.w3schools.com/cssref/pr_pos_vertical-align.asp)
 * (Try “middle”)
 *  Thread Starter [-Andreas](https://wordpress.org/support/users/-andreas/)
 * (@-andreas)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/html-text-code/#post-5701036)
 * That’s not working I’m afraid.
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/html-text-code/#post-5701038)
 * Can you post a link to your site where this is – there’s really no way to help
   much more without seeing it.

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

The topic ‘HTML Text Code’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 2 participants
 * Last reply from: [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/html-text-code/#post-5701038)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
