/    Sign up×
Community /Pin to ProfileBookmark

Replacing Font and bold tags with CSS

Hi everyone,

I am trying to make this this code

[QUOTE]

<p style=”margin-top: 0″><font color=”#FF0000″>Job Title:&nbsp; </font><b>Idaho Jobs</b><font color=”#FF0000″>&nbsp;</font>(F/T &amp; P/T Opportunities)

[/QUOTE]

look the same with CSS. My problem is that using DIVS or P or H1… tags make new lines. I need it to all be on the same line. I am sure this is simple but I am lost with it right now. Any ideas?

Scuba

to post a comment
CSS

6 Comments(s)

Copy linkTweet thisAlerts:
@soccer362001Oct 11.2004 — Try <span style="color:#ff0000; font-weight:bold;>Text here</span>

I don't know if that will work or not.
Copy linkTweet thisAlerts:
@Scuba_SteveauthorOct 11.2004 — I guess I was unclear. I am using an external style sheet and trying to replicate the former in-line css using an external style sheet. Thank you for the suggestion though.

Scuba
Copy linkTweet thisAlerts:
@DarkScytheOct 11.2004 — have you tried adding "display: inline;" ?

they might be being treated as block elements..
Copy linkTweet thisAlerts:
@Paul_JrOct 11.2004 — [b]CSS[/b]
<i>
</i>.someclass {
margin-top: 0;
}
.someclass span {
color: #f00;
}

[b]HTML[/b]
<i>
</i>&lt;p class="someclass"&gt;&lt;span&gt;Job Title: &lt;/span&gt;&lt;strong&gt;Idaho Jobs&lt;/strong&gt;(F/T &amp; P/T Opportunities)&lt;/p&gt;
Copy linkTweet thisAlerts:
@toicontienOct 11.2004 — EDIT: GAH! Paul beat me to it ? But here's another way to skin this cat.

You don't necessarily need to create boldface text with CSS only. If you want text to be boldface, and surrounded by normal-weighted text, use the <strong> tag instead of the <b> tag. Making text boldface really means you want to give [b]strong[/b] emphasis to those words, hence using the <strong> tag makes sense.

In your case:
<i>
</i>/* Place this CSS in your external style sheet */
p.special {
color: #f00;
margin-top: 0;
}

p.special strong { color: #000; }

Then use the following HTML:
<i>
</i>&lt;p class="special"&gt;Job Title: &lt;strong&gt;Idaho Jobs (F/T &amp;amp;amp; P/T Opportunities)&lt;/strong&gt;&lt;/p&gt;
Copy linkTweet thisAlerts:
@Scuba_SteveauthorOct 11.2004 — Thank you,

That works great. Have a great day.

Scuba Steve
×

Success!

Help @Scuba_Steve spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...