Jump to content


Text overflow - CSS


3 replies to this topic

#1 Bradlc

    Young Padawan

  • Members
  • Pip
  • 21 posts
  • Gender:Male

Posted 06 March 2007 - 05:48 PM

Hey ;) ,
I have attached a very simple representation of what I am trying to do.

Note: A, B and C are 3 seperate images.
In example 1, the text just overflows from image A...
In example 2, BOTH image A and image B extend to allow all the text to fit in. That is what I am trying to do using CSS.

I hope you understand and any help is greatly appreciated.

Thx.

Attached File  overflow.jpg   129.37K   81 downloads

#2 greg

    Jedi In Training

  • Members
  • PipPip
  • 499 posts
  • Location:New York City
  • Interests:Fine art, web and graphic design, naval architecture, chess, and sports.

Posted 06 March 2007 - 07:34 PM

Just use divs (for A, B and C), and it won't overflow by default.

#3 _*Creative Insanity_*

  • Guests

Posted 06 March 2007 - 07:40 PM

Do this.. div names are just from your example.. so name them better.
Sizes are just random.


#B{
height:545px;
width:330px;
}
#A{
height:400px;
width:300px;
margin:15px 0px 0px 15px;
overflow:auto
}
#C{
height:200px
width:300px
margin:15px 0px 0px 15px;
}

If you want A and C centered add below to B
margin:0px auto;

The overflow will hide any text below the set height and a scrollbar will be created to scroll the over flowed text.

Edited by Creative Insanity, 06 March 2007 - 07:47 PM.


#4 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 07 March 2007 - 01:43 AM

By the picture you gave, i undesrtand what you are trying to do, but what we all have to keep in mind is that some images don't stretch or even tessalate well. Coming up with a working solution would be a lot easier if you could provide the actual images that need stretching.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users