SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: Placing <div> in Paragraph?
-
Jun 21, 2006, 21:04 #1
- Join Date
- Oct 2005
- Location
- Melbourne
- Posts
- 157
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Placing <div> in Paragraph?
Im working on a site that is going to have a section on poker hand rankings.
Curently im having some problems geting a <div> to sit inside a paragraph.
Here is my HTML:
HTML Code:<p>Here is some text before the king of spades <div class="spade">K</div> and here is the text after the king of spades.</p>
Code:.spade { display: inline; font-weight: bold; padding-right: 8px; margin-right: 3px; background-image: url(poker_spade.gif); background-repeat: no-repeat; }
How can you get a div to sit inside a paragraph?
Thanks.
-
Jun 21, 2006, 21:16 #2
- Join Date
- Oct 2005
- Location
- Brisbane, QLD
- Posts
- 4,067
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Use span instead of div.
-
Jun 21, 2006, 21:30 #3
- Join Date
- Oct 2005
- Location
- Melbourne
- Posts
- 157
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Sweet, thanks mate.
Bookmarks