Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

CSS change text color without line break

Posted on 2010-09-15
3
Medium Priority
?
312 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 2000 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

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

704 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