471,598 Members | 1,058 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,598 software developers and data experts.

CSS/HTML Text On Same Line Question

I am new to CSS and something is driving me crazy.
I was asked to remove a font tag and change it to CSS.

original code:
<p><font> color="#008080">Submitted By: /font> <i>Your Name</i></p>

Change To CSS:
p {color:#008080;}
<p> Submitted by: </p> <i>Dawn O'Shaughnessy</i>

The Submitted By and my name should be 2 different colors--Got that part!!!

However, I cannot get my name to appear on the same line as Submitted By.
Shows Up Like This? Why?? Many Thanks! Dawn

Submitted by:

Dawn O'Shaughnessy
Aug 22 '07 #1
2 2665
7,435 Expert 4TB
<p> is a block level element that occupies the entire width of the page. So you need to shorten the length by adding 'width:100px' or whatever and then 'float:left' which will allow your name to start to the right.
Aug 22 '07 #2
Try this,

[HTML]p {
color: #008080;
em {
color: #FF00CC;
<p>Submitted by <em>Dawn O'Shaughnessy</em></p>[/HTML]
Aug 22 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

71 posts views Thread by tomy_baseo | last post: by
reply views Thread by Ed Swartz | last post: by
11 posts views Thread by Brett | last post: by
7 posts views Thread by Arne | last post: by
19 posts views Thread by Samuel Murray | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by Anwar ali | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.