Solved

Problem getting text to wrap properly with css

Posted on 2007-04-03
3
680 Views
Last Modified: 2012-06-21
I'm having a problem getting this text to wrap properly. If you take a look here:

http://www.cooltoneamps.com/rcc/

the Welcome text is going off the right edge. I have set up padding but it doesn't seem to effect it.
Here is the css:

#wrap p
{
      vertical-align: top;
      float: left;
      margin-top: 20px;
      margin-left: 35px;
      margin-right:20px;
      color: white;
      height: 225px;
      width: 425px;
      font-size: 120%;
      background-image: url(../img/welcomediv.gif);
      background-repeat: no-repeat;
      padding-left: 15px;
      padding-right: 10px;
      padding-top: 10px;
      text-indent: 15px;
      text-align: left;
}

And code:

<div id="wrap">
           <div id="slideshow">          
               <Bewise:FlashControl ID="FlashControl1" runat="server" Height="215px" MovieUrl="~/monoslideshow.swf" Scale="Noborder" Width="350px" WMode="Opaque">
               </Bewise:FlashControl>
           </div>
       
            <p>
            <em>Welcome</em><br /><br /><br />
            Reidsville Christian Church exists to share
            the good news of Jesus with people everywhere,
            to teach and strengthen the believers, to
            minister  to the needs of others, and to be
            a Christian influence in the community.
            </p>
           
           
      </div><!--wrap-->

0
Comment
Question by:rutledgj
3 Comments
 
LVL 10

Accepted Solution

by:
jinn_hnnl earned 150 total points
ID: 18845017
I would just do it like:
define a css class - start with a dot

.welcome
{
       vertical-align: top;
      float: left;
      margin-top: 20px;
      margin-left: 35px;
      margin-right:20px;
      color: white;
      height: 225px;
      width: 425px;
      font-size: 120%;
      background-image: url(../img/welcomediv.gif);
      background-repeat: no-repeat;
      padding-left: 15px;
      padding-right: 10px;
      padding-top: 10px;
      text-indent: 15px;
      text-align: left;
}

and in the aspx file:

..
            <div class="welcome">
            <em>Welcome</em><br /><br /><br />
            Reidsville Christian Church exists to share
            the good news of Jesus with people everywhere,
            to teach and strengthen the believers, to
            minister  to the needs of others, and to be
            a Christian influence in the community.
            </div>

Hope this help

JINN
0
 

Author Comment

by:rutledgj
ID: 18845103
Tried that but it didn't change anything:(
0
 
LVL 8

Assisted Solution

by:klykken
klykken earned 100 total points
ID: 18845372
Adding padding will add to the width of the box. Decrease the width of the element to compensate for left and right padding:

width: 400px;

-klykken
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question