Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7979385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:45:52+00:00 2026-06-04T09:45:52+00:00

This is the html code for my comment list: <div id=’commentbox’> <ul id=’holder’> <li

  • 0

This is the html code for my comment list:

<div id='commentbox'>
    <ul id='holder'>        
        <li class='comment'><span class='commenter'>commenter1: </span>
            <span class='commsg'>blabla1</span>
        </li>    
        <li class='comment'><span class='commenter'>commenter2: </span>
            <span class='commsg'>blabla2</span>
        </li>
        <li class='comment'><span class='commenter'>commenter3: </span>
            <span class='commsg'>blablaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa3</span>
        </li>
        <li class='comment'><span class='commenter'>commenter4: </span>
            <span class='commsg'>blabla4</span>
        </li>    
    </ul>
</div>

And here is the css:

.comment{
    border-style:solid;
    width:500px;
}
.commsg{
    font-size: 12px;
    color: #333333;
    font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
}
.commenter{
    font-family: 'Gill Sans', Verdana;
    font-size: 11px;
    line-height: 14px;
    text-transform: capitalize;
    letter-spacing: 1px;
    font-weight: bold;
}

My problem is that if I insert a big comment like the third one, it gets out of the <li> border. How can I have a certain comment width?

Problem solved. Thank you both.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T09:45:53+00:00Added an answer on June 4, 2026 at 9:45 am

    In Firefox your current markup and styles should work fine. The problem is, your test comment has no spaces in it, so it is treated as one word. Browsers aren’t smart enough to be able to break up a word with a dash, like a word processor.

    Check out this fiddle. Note the huge comment. It wraps just fine and leaves the <li> width as is.

    Now check out this fiddle. See how when there are no spaces in the word, it overlaps. The browser doesn’t know what else to do with it.

    One way around it would be to scroll the overflow from your .comment element:

    overflow-x:scroll;
    

    See fiddle. The downside is the scrollbars on each element, which don’t look great, but at least get the job done if there is a huge word without spaces (such as a hyperlink, etc.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

lets say i have this html code : <div> <a> <span id=a> </span> </a>
I have this HTML code: <div class='com_box'> <div class='com_box_c'> <div class='com_box_info'> <a id='quote'>quote</a> </div>
I come across this: html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,abbr,address,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,var,b,i,d l,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,figure,footer,header,hgroup,menu,nav,section,menu,time,mark,audio,video{background:transparent;border:0;font-size:100%;list-style:none;margin:0;padding:0;outline:0;vertical-align:baseline;} The comment mention reset, I guess is used
I have this HTML code: <div id=main> <div id=dv_7>...</div> <div id=dv_1>...</div> <div id=dv_8>...</div> <div
I'm trying to reproduce this html using jquery on a click event. <div class=comments_action_207>
I have this HTML Code: <!doctype html> <html> <head> <meta charset=utf-8> <title>Untitled Document</title> <link
i have this html code: <select name=category id=category> <option value=0>&laquo;Seleziona la categoria&raquo;</option> <option value='1'
I have this html code: <form name=input action=html_form_action.asp method=post id=formID> Username: <input type=text name=user
I have this HTML code for radios: <input type='radio' name='a_27' value='Yes' id='a_27_0' /> <input
I have this html code that i want to edit with jQuery. Here is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.