Solved

Problem getting text to wrap properly with css

Posted on 2007-04-03
3
685 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…

691 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