Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: wrapable tags (CSS related)  (Read 3334 times)

0 Members and 1 Guest are viewing this topic.

IncredibleGuy

  • Guest
wrapable tags (CSS related)
« on: April 29, 2007, 12:06:42 PM »
Hey, I've been working with <div> and <p> tags and am a little upset by the fact that these tags don't wrap to the text inside them. What I mean by that is that if I were to apply CSS elements like border or background color to a p or div tag, the border or bg color will stretch across the entire page instead of just ending where the text inside them ends. HOWEVER, I have noticed that all my A HREF tags do, in fact, wrap around there text (which is a very convenient) when CSS styles are applied, and I was wondering if there were any other HTML tags that contain  this useful feature as well.

Thanks in advance
MJ

Raptor

  • Guest
Re: wrapable tags (CSS related)
« Reply #1 on: April 29, 2007, 12:55:45 PM »
Use display: block display: inline on the object in question or on the parent object.

If that doesn't fix it, your HTML code isn't proper.

More info

Or show your code here.

IncredibleGuy

  • Guest
Re: wrapable tags (CSS related)
« Reply #2 on: April 29, 2007, 07:06:36 PM »
thanks, I'll try that out as soon as I can.  ;D