Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-10-2012, 03:17 PM   PM User | #1
graud
New to the CF scene

 
Join Date: Dec 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
graud is an unknown quantity at this point
Handling overflow

Hi all,
On this page's main slider and the 6-story box beneath, there are some issues handling overflow. Varying heights of headlines and images make text cut off on the bottom of their containers.

Ideally, I would like no text to be cut off and for there to be an ellipsis (...) at the point where the text is cut off.

Is this possible? Thank you for your help.
graud is offline   Reply With Quote
Old 12-10-2012, 05:42 PM   PM User | #2
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello graud,
I prefer not to set heights on elements and allow them to expand to contain what you put in them.
Like this -
Code:
.homecontent_02 .info2 {
    background: none repeat scroll 0 0 #FFFFFF;
    border-right: 4px solid #FFFFFF;
    display: inline-block;
    float: left;
    /*height: 90px;*/
    margin: 0 1px 0 0;
    overflow: hidden;
    padding: 0 10px 10px;
    width: 320px;
}
.homecontent_02 .holder p {
    font-size: 11px;
    /*height: 52px;*/
    line-height: 18px;
    margin: 2px 0 0;
    overflow: hidden;
    padding: 0 2px !important;
}
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 12-10-2012, 05:56 PM   PM User | #3
LearningCoder
Regular Coder

 
LearningCoder's Avatar
 
Join Date: Jan 2011
Location: The Pleiades
Posts: 849
Thanks: 67
Thanked 28 Times in 28 Posts
LearningCoder is an unknown quantity at this point
Yea I noticed that when I declare heights on elements, when you zoom out of the browser and/or different resolutions, you will notice a paragraph for instance will 'overflow' your div/container. Just give the desired padding to the bottom of the element and delete the height.

Regards,

LC.
LearningCoder is offline   Reply With Quote
Old 12-10-2012, 06:19 PM   PM User | #4
graud
New to the CF scene

 
Join Date: Dec 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
graud is an unknown quantity at this point
Thanks for your quick responses.
My problem is that the paragraph elements (eg. in div class "feature_info" in the main carousel) print much more text than is shown and the bottom of the "feature_list" container cuts the text.

I can't seem to remove the height from "feature_list". When I add the padding to "feature_list", this still happens, space is just added between the cut text and the bottom of the container, as you can see in the attachment.

Is there anything that can be done about this?
Attached Thumbnails
Click image for larger version

Name:	Screen Shot 2012-12-10 at 1.15.17 PM.png
Views:	16
Size:	9.9 KB
ID:	11788  
graud is offline   Reply With Quote
Old 12-10-2012, 07:00 PM   PM User | #5
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Quote:
Originally Posted by graud View Post

Is there anything that can be done about this?
Maybe like this -
Code:
div#feature_list {
    /*height: 390px;
    overflow: hidden;*/
    position: relative;
    width: 474px;
}
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 12-10-2012, 08:36 PM   PM User | #6
graud
New to the CF scene

 
Join Date: Dec 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
graud is an unknown quantity at this point
If you try this in Firefox or Chrome Developer Tools, when you remove the height, the entire container and all of the content is erased. So it looks like I need to keep the height declaration. Nothing happens when I remove the overflow:hidden; statement.

Thanks
graud is offline   Reply With Quote
Old 12-13-2012, 06:36 PM   PM User | #7
graud
New to the CF scene

 
Join Date: Dec 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
graud is an unknown quantity at this point
Bump. Anyone have any ideas on stopping the text from getting sliced at the bottom of the container?

As per above, removing the height line in div#feature_list removes the whole carousel.

See page here.
graud is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:51 AM.


Advertisement
Log in to turn off these ads.