Helping ordinary people create extraordinary websites!

Go Back   Web Development Forum > Website Designing > HTML/CSS
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-06-2007, 05:15 PM
Junior Member
 
Join Date: Mar 2007
Posts: 2
Default text on same line

I'm having problems getting my text to show up on the same line. I'm not sure what I'm doing wrong.

Here is my code:
Code:
<div id="subtitle"><b>What Personal Information Is Collected?</b>&nbsp;&nbsp;<div style="font-size:7px"><a href="#whatinfo">SEE MORE DETAILS</a></div></div>
The "subtitle" CSS is external:
Code:
#subtitle {
font-family:sans-serif, arial, verdana;
font-size:9pt;
background-color:#cccccc;
padding-left:6px;
}
I don't understand why the "SEE MORE DETAILS" link showing up on a second line? I want it at the end of my subtitle.

Thanks for your help in advance.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 12-08-2007, 12:14 AM
ryanhellyer's Avatar
Super Moderator
 
Join Date: Dec 2007
Posts: 707
Default

Quote:
Originally Posted by cbesh2
I'm having problems getting my text to show up on the same line. I'm not sure what I'm doing wrong.
Hi,
DIV's are block level elements. By default they have a width of auto applied to them which causes the second piece of text to drop down a line. Instead use a SPAN which is an inline element and will keep your text on the same line.

cheers,
Ryan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 12-08-2007, 08:09 PM
Junior Member
 
Join Date: Dec 2007
Posts: 28
Send a message via Yahoo to TYPELiFE
Default

Or another technical solution is you can add a display:inline to your style attributes. However, using span elements would be better in this case.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Numerical ID's Several Tables or text ids in the same table? md_doc Database Development 1 01-09-2008 12:15 PM
What does this line mean? md_doc Server-Side Scripting 0 01-09-2008 10:12 AM
text in Photoshop Nefrit Graphics and Multimedia 1 12-25-2007 08:42 AM
Hollow" text in Photoshop pntglobal Graphics and Multimedia 0 10-30-2007 03:23 AM
how to open and save text file (.txt) una_noche Server-Side Scripting 0 06-27-2007 12:15 AM


All times are GMT -5. The time now is 10:18 AM.


Website Design by Ducani Media Group
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.