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 8568489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:07:27+00:00 2026-06-11T18:07:27+00:00

As you might heard in the title I’m using PHP to add info to

  • 0

As you might heard in the title I’m using PHP to add info to a database and then use the info. It’s a simple comment system. I’m very new to PHP and don’t really know if there might be any easier way of creating what I’m doing but my problem is still the same. When I get info that is to big for the div to handle in one row if it got no spaces what so ever, it automatically increases the width and height of the div.

At the same time I’m having another div that contains the personal info like name and stuff. It is 1/4 of the width and the comment-div id 3/4 (as I’ve set it with CSS). The info-div gets smaller as the comment is getting bigger (for some insane reason, both in width and height!).

When I get the info I get all info from one column and displaying them in a table. I place the comment and the info-info in two separate td tags and each cell info in a div with the appropriate width and height (height 150px width 25%/75%).

I’ve already tried to break the line with word-wrap white-space and overflow but nothing seams to work.

I got some idea myself of how it comes the browser shows it like this, since the width and the padding of the divs seam to be matching with the values in the CSS if I’d have placed the info in the body and not in the content div. Why it would react like that I have no idea and I want to know if anyone knows what I can do about it… And as said, this only happens when a string is to long. Otherwise it’s working 100% fine.

Thankful for any help… and I use PHP, JS, HTML, CSS for the moment and a solution needs to be with ether of the formats (I could use like jQuery as well and other lookalikes)

  • 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-11T18:07:28+00:00Added an answer on June 11, 2026 at 6:07 pm

    maybe you could use

    css

    max-height: 300px;
    overflow: scroll;
    

    this means that your div never goes bigger that 300px and if the content is longer you will get an scrollbar.

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

Sidebar

Related Questions

I realise this might be hard to explain, so let me start by using
This might be a simple question for some people since it was quite hard
The title might be worded strange, but it's probably because I don't even know
I am having a trouble using jQuery in my HTML. This might be a
I have heard it might not be made for this, but I'd really like
Again, apologies for the poor title - very hard to describe. I used the
I know the title is Very wide - spanning over a lot ! And
I'm French so I might not speak English very well. I'm trying to put
First of all, I just started PHP. I know my methods might not be
The title might be a little weird but let me explain. I have User,

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.