Click to See Complete Forum and Search --> : div tags - Not sure if I'm using them properly


binkyboo
04-01-2004, 04:22 PM
Alrighty, here's my CSS script:

#interactive {
color: #5500AA;
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 14px;
font-style: italic;
}

Here's my html code:

<p>Here is some text talking about the activity! <div id="interactive">It's
Interactive!</div> Just click the button to begin.</p>

Unfortunately when I test the page is looks like this:

Here is some text talking about the activity!

It's Interactive!
Just click the button to begin.

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!".

Sam
04-01-2004, 04:27 PM
Div is a block level element, you'll want an inline level element, like span for this:

<p>Here is some text talking about the activity! <span id="interactive">It's
Interactive!</span> Just click the button to begin.</p>

binkyboo
04-01-2004, 04:53 PM
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!

Sam
04-01-2004, 04:55 PM
First post has been edited, didn't see that typo. the CSS would exactly the same

binkyboo
04-01-2004, 04:57 PM
Yep, I just figured it out. Thanks for your help!