Solved

CSS change text color without line break

Posted on 2010-09-15
3
310 Views
Last Modified: 2012-05-10
On my page I have a line of text. I want one word to be a different color. So I added a new css rule and applied it to the word, but now the text is creating a new line. It looks like this:

Edit content for the
<blue text> Why Join </blue text>
page.

and I want it to look like this:
Edit content for the  <blue text> Why Join </blue text> page.

Below is my CSS and HTML, can someone tell me how to get all of this on one line with the blue text? Thanks.

My page is here: http://www.glowfishtw.com/play3on3/admin_whyjoin_update.aspx

CSS
.admin_page_title {
      font-weight: bold;
      color: #0CF;
}
.admin_content_middle {
      background-image: url(../images/admin_bg_middle.png);
      background-repeat: repeat-y;
      width: 905px;
      padding-top: 5px;
      padding-right: 10px;
      padding-bottom: 5px;
      padding-left: 45px;
      text-align: center;
      font-family: Arial, Helvetica, sans-serif;
      font-size: 24px;
      color: #333;
}

HTML
  <div class="admin_content_middle">Edit content for the
    <div class="admin_page_title">Why Join</div>
page.</div>
0
Comment
Question by:elliottbenzle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 30

Accepted Solution

by:
LZ1 earned 500 total points
ID: 33685568
You will have to add display:inline to the .admin_page_title class.

Divs are block level elements.  You may have wanted to do a span instead honestly.
0
 
LVL 4

Author Closing Comment

by:elliottbenzle
ID: 33685589
Thanks, I've always wondered about  now I know.
0
 
LVL 30

Expert Comment

by:LZ1
ID: 33685924
And knowing is half the battle!  
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question