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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:55:33+00:00 2026-06-14T17:55:33+00:00

I am trying to add images in a webview for each 3 column but

  • 0

I am trying to add images in a webview for each 3 column but the image are displayed outside the table in horizontal. where am i wrong ? a hint please.

        String str = "";           
        str += "<table width='200' border='1'><tr>";
        int i = 1;

        for (i=1; i < my_image.length-1; i++) {
            if (i%3==0) {    
                str += "<td><a href='"+my_image[i]+"'"+" class='popup-open'><img src='"+my_image[i]+""+"width='80' height='65'></a></td></tr><tr>";
            } else {
                str+= "<td><a href='"+my_image[i]+"'class='popup-open'><img src=' "+my_image[i]+"' width='80' height='65'></a></td></tr>";    
            }
            str+="</tr></table>";
        }

        html_content = "<strong>"+title+"</strong>" +
                " <br><br><img src='"+single_image+"'width='300' height='211'>" +    
                "<br> " +   
                ""+content+"<br>"+str;
  • 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-14T17:55:34+00:00Added an answer on June 14, 2026 at 5:55 pm

    Almost certainly you aren’t closing a tag somewhere every opening HTML tag should be closed.

    You are definitely ending your table with <tr></tr> which is not very nice.

    You should definitely do some research into using JSP or similar. Using JSTL within your JSPs would be much preferable, easier to read and more maintainable in the long run. An hour’s reading of a JSTL / JSP tutorial would save you many in the future.

    EDIT:
    Actually it looks like you aren’t closing the ' around the src attribute:

    str += "<td><a href='"+my_image[i]+"'"+" class='popup-open'><img
    src='"+my_image[i]+""+

    should be:

    str += "<td><a href='"+my_image[i]+"'"+" class='popup-open'><img
    src='"+my_image[i]+"'"+

    Also using width and height attributes is bad form. Set a class using the class attribute and size the images with CSS – it will prevent headaches / code changes if you want to change the size of the images at any point in the future.

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

Sidebar

Related Questions

I'm trying to add images to table cells in a grouped UITableView but the
I am trying to add multiple images to Html5 canvas but every time I
I'm trying to add a .gif image into my java applet but for some
Im trying to show an image in an webview but my app crashes as
I am trying to add Images to a GridView, but the images never actually
I am trying to add an image to a list of images when a
I'm trying to add these images to the QTMovie, but the file never appears.
I'm trying to add caption of images on top of the image. These images
I'm trying to add a ViewPager for each tab to display images. For the
I'm trying to add images to my models in my Django app. models.py class

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.