/    Sign up×
Community /Pin to ProfileBookmark

div tags – Not sure if I’m using them properly

Alrighty, here’s my CSS script:

[code]#interactive {
color: #5500AA;
font-family: Georgia, “Times New Roman”, Times, serif;
font-size: 14px;
font-style: italic;
}[/code]

Here’s my html code:

[code]<p>Here is some text talking about the activity! <div id=”interactive”>It’s
Interactive!</div> Just click the button to begin.</p>[/code]

Unfortunately when I test the page is looks like this:

[FONT=times new roman]Here is some text talking about the activity! [/FONT]

[FONT=times new roman][COLOR=purple][I]It’s Interactive![/FONT][/COLOR][/I]
[FONT=times new roman]Just click the button to begin.[/FONT]

Why does it put paragraph breaks in where I applied the div tags? I want this all to be one sentence with the text formatting applied to “It’s Interactive!”.

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@SamApr 01.2004 — Div is a block level element, you'll want an inline level element, like span for this:
<i>
</i>&lt;p&gt;Here is some text talking about the activity! &lt;[color=red]span[/color] id="interactive"&gt;It's
Interactive!&lt;/span&gt; Just click the button to begin.&lt;/p&gt;
Copy linkTweet thisAlerts:
@binkybooauthorApr 01.2004 — How would the CSS look? Do I need to end with </span>. I'm so new to this and the books I purchased are a little over my head at this point. Thanks for your help!
Copy linkTweet thisAlerts:
@SamApr 01.2004 — First post has been edited, didn't see that typo. the CSS would exactly the same
Copy linkTweet thisAlerts:
@binkybooauthorApr 01.2004 — Yep, I just figured it out. Thanks for your help!
×

Success!

Help @binkyboo 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 5.2,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

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