SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist OwainGDWilliams's Avatar
    Join Date
    Aug 2005
    Location
    Scotland, UK
    Posts
    435
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Text spilling over div.

    Hi!
    I am having problems keeping the text within the center column of my site, could someone please have a look at it and maybe show me where I am going wrong. This is my first attempt at greating a site completely with CSS rather than tables

    www.tractionkiting.co.uk/test_site/index.htm

    Thanks,

    Owain.

  2. #2
    SitePoint Evangelist figbeam's Avatar
    Join Date
    Jun 2004
    Location
    Sweden
    Posts
    508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This seems to work:
    Code:
    .maincontent {
    	background: url("images/bordermain.jpg");
    	background-repeat: repeat-y;
    	height:400px;
    	width:458px;
    	width:454px; /* Decreased by padding-right */
    	font-size: 0.9em;
    	color: #000000;
    	padding-left:4px;
    	padding-right:4px; /* or any value you want. Just be sure to take it of the width */
    	margin-left: 158px;
    /*	margin-right:150px;  You don't seem to need this... */
    	}
    Your .maincontent div was wider than the background picture suggests. You can detect this kind of layout problems by also setting a screaming background-color to the div. Try it. You'll never look back.

  3. #3
    SitePoint Addict operator's Avatar
    Join Date
    Aug 2004
    Location
    Bangkok
    Posts
    388
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I second the "screaming bkgd colour" technique. Very helpful at times.

  4. #4
    SitePoint Evangelist OwainGDWilliams's Avatar
    Join Date
    Aug 2005
    Location
    Scotland, UK
    Posts
    435
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Brilliant, thanks for your help!! Much more helpful that some people on another forum I was posting on

    I will keep the bkgd colour thing in mind. Cheers.

    O.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •