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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:42:03+00:00 2026-05-27T06:42:03+00:00

I am trying to create something simlar to a DataGridView in html. I will

  • 0

I am trying to create something simlar to a DataGridView in html. I will be pulling data from a database and inserting into my DGV. I have a limited space to work with for this DGV so I want it to scroll on both the x & y-axis. I have tried using tables and a div. When I try either th tags or h4, the tags wrap instead of becoming scrollable along the x-axis.

<div id="dgv">
  <div><h4>Header1</h4><h4>Header2</h4><h4>Header3</h4><h4>Header4</h4><h4>Header5</h4>
</div>

CSS:
#dgv
{
  overflow: scroll;
  white-space: nowrap;
  width: 500px;
  height: 200px;
}

#dgv h4
{
  display: inline;
  margin: 0px;
  width: 150px;
  float: left;
  border-right: 1px solid black;
}
  • 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-05-27T06:42:04+00:00Added an answer on May 27, 2026 at 6:42 am

    You need to give the <div> inside <div id="dgv"> a width greater than its parent. Try adding this CSS:

    #dgv div {
        width: 1000px;
    }
    

    That should give you horizontal scrolling. Likewise, if you want vertical scrolling, it’ll need a height greater than it’s container as well.

    Think of <div id="dgv"> as a window, and the <div> inside it as the canvas you’re looking at through that window. If the canvas is larger than the window, scrolling happens. If no specific size is set for the inner <div> it just inherits it from its parent.

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

Sidebar

Related Questions

I'm trying to create something that would have the looks of a tabbed interface
I'm trying to create a custom control - a button - which will have
I am trying to create a panel which will have a set of buttons
I am a beginning javascript programmer. I am trying to create something similar to
I am trying to create something on a webpage that allows my users to
I am trying to create something in Perl that is basically like the Unix
I am trying to create something that uses the idea of the UIPopOverController, I
I'm trying to create a user control that allows users to make something like
I'm trying to create a cmdlet with the name Invoke-Something. But I cannot find
I'm trying to create user profiles for my site where the URL is something

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.