Help - Search - Members - Calendar
Full Version: Text starting on new line after targeted with CSS id
HTMLHelp Forums > Web Authoring > Cascading Style Sheets

Please see the last line of my page here:

I have the phone number targeted with CSS to change the font color. This is causing the text immediately after it to start on a new line. I added div inline:block elements which corrected the issue for Firefox and Chrome, but in Internet explorer it is still starting on a new line. See here:

Any advice is appreciated. Thanks!
No, the cause of that is that you've made sure the phone number will be displayed on its own line by enclosing it in not only one but two block level elements. They will break the line, before and after. The text before and after the number is also in their own blocks. Use one block level element for all of the text and us the id you need for the text color directly with STRONG instead.
Again, thank you for taking the time to respond and your solution worked perfectly.

If I wasn't using STRONG in this instance, what element should I be using so it doesn't break the line?
If nothing else is called for use SPAN. That's what it's for. An anonymous inline element without meaning and default browser styling. Just something to hang CSS on.
Thanks! I appreciate the help biggrin.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2015 Invision Power Services, Inc.