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

  • Home
  • SEARCH
  • 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 7409583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:06:17+00:00 2026-05-29T06:06:17+00:00

I am making webpage where data from database are put in a table. Each

  • 0

I am making webpage where data from database are put in a table. Each row has 3 columns. I want each row to be clickable however it is not possible since you cannot encapsulate a table row with anchor. There are some solutions around but I want to skip these tricks and use divs as rows. In each div, I can put three floated inline-block divs as columns to get the same result. But is there a way to avoid 3 column-like divs in this example? Just one div for each row with 3 text parts (columns in deed) aligned vertically like in a normal html table? I have desperately tried str_pad in PHP and it solves a different issue.

  • 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-29T06:06:18+00:00Added an answer on May 29, 2026 at 6:06 am

    Mehmed,
    Try this…

    [HTML]

    <div id="row1" class="rows">
     <div class="cols col1"></div>
     <div class="cols col2"></div>
     <div class="cols col3"></div>
     <div class="cleaner"></div>
    </div><!--end row1-->
    
    <div id="row2" class="rows rowsAlt">
     <div class="col1"></div>
     <div class="col2"></div>
     <div class="col3"></div>
     <div class="cleaner"></div>
    </div><!--end row2-->
    

    [CSS]

    .cleaner{clear: left; line-height: 0; height: 0;} 
    .rows{width: 300px; min-height: 25px;}
    .rowsAlt{background-color: blue;}
    
    .cols{height: 100%; float: left;}
    .col1{width: 25px;}
    .col2{width: 50px;}
    .col3{width: 100px;}
    

    Then in JQuery you can just do a click event on the rows class and get it’s ID to traverse through it’s child elements. This makes the entire row clickable. You can also do somethings with the columns if you’d like.

    [JQuery]

    $('.rows').live("click", function(){ 
      var thisID = $(this).attr('id');
    
      alert(thisID);
      //now that you have the id, you can traverse that specific row
    });
    

    This should be a good start for you, Mehmed…

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

Sidebar

Related Questions

I am using BeautifulSoup to scrape data from a webpage. I want to compare
I am loading a webpage into a webview from the database with the loadDataWithBaseURL()
i am making an iphone app that get data from web ,i use HPPLE
I'm making a webpage with dynamic content that enters the view with AJAX polling.
In the process of making an old webpage standard compliant, the validator came across
I am making a very basic webpage, consisting of some text inside a fixed
Making an adobe flex ui in which data that is calculated must use proprietary
I'm making an application that directly takes images from a site and downloads them
Lets say I have a database table called Scrape possibly setup like: UserID (int)
I am loading data from external html files within my domain into a div

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.