Seeking guidance on resolving issues with this div table

After almost getting everything set up, I encountered some strange issues that have been difficult to resolve. The challenges I'm facing include:

  1. The spacing on the right side is too large.
  2. Tables always appear stacked without any spacing in between. My goal is to have them accommodate as many columns of "boxes" as possible with spaces between each before creating a new row based on the user's resolution width.
  3. Oddly enough, the image for the border on the right side seems to be displaying incorrectly or on the left side. Despite attempting multiple fixes, I cannot seem to rectify the issue. Although, it seems like this one may be resolved! - Seemed to have fixed this one!
  4. Currently, I find myself needing to paste the entire TR code rather than just using
    <div>*infohere*</div>
    , otherwise, the first box gets stretched further (as seen in the initial example of the jsfiddle). Is there a way to achieve what I want by only utilizing divs? Or is that impossible for my requirements?

CSS:

table#t_gallery, table#t_content{
    border-collapse:collapse;
    border-spacing:0px;
    margin:0px auto;
    padding:0px;
}

table#t_gallery {
    margin-top:12px;
}

table#t_gallery td {
    padding:0px;
}

#t_gallery_top, #t_gallery_bottom {
    background: url("/top.png") 0 0 no-repeat;
    height:6px;
    width:265px;
}

#t_gallery_bottom {
    background-image:url("/bottom.png");
}

#t_gallery_left, #t_gallery_right {
    background: rgba(11, 14, 15, .5) url("/left.png") 0 0 repeat-y;
    width:6px;
}

#t_gallery_right {
    background-image:url("/right.png");
}

#t_gallery_middle {
    background-color: rgba(11, 14, 15, .65);
    width:252px;
}

#t_gallery_middle div{
    display:inline-block;
    text-align:center;
    padding:5px 10px 5px;
    vertical-align:top;
}

JSFiddle: https://jsfiddle.net/0waobznt/
What I'm trying to aim for: https://i.sstatic.net/EIJRk.png

Answer №1

Hey, I've made some adjustments to your code to achieve the desired outcome shown in the image. Feel free to test out the updated code below:

table#t_gallery, table#t_content{
border-collapse:separate;
border-spacing:0px;
margin:0px auto;
padding:0px;

}
table#t_global{
border-collapse:separate;
border-spacing:20px;
margin:0px auto;
padding:0px;

}
table#t_gallery {
margin-top:12px;
}

table#t_gallery td {
padding:0px;
}
table#t_gallery tr {

  margin:20px !important;
}
#t_gallery_top, #t_gallery_bottom {
background: url("http://seac.crystal-dreams.us/top.png") 0 0 no-repeat;
height:6px;
width:265px;
}

#t_gallery_bottom {
background-image:url("http://seac.crystal-dreams.us/bottom.png");
}

#t_gallery_left, #t_gallery_right {
background: rgba(11, 14, 15, .5) url("http://seac.crystal-dreams.us/left.png") 0 0 repeat-y;
width:6px;
}

#t_gallery_right {
background-image:url("http://seac.crystal-dreams.us/right.png");
}

#t_gallery_middle {
background-color: rgba(11, 14, 15, .65);
width:252px;
text-align:center;
border-spacing:100px;
}

#t_gallery_middle div{
display:inline-block;
text-align:center;
padding:5px 10px 5px;

}
<table id="t_global">
<tr><td><table id="t_gallery">
  <tr>
<td id="t_gallery_top" colspan="3"></td>
  </tr><tr>
<td id="t_gallery_left"> </td>
<td id="t_gallery_middle"> 

<!-- Do not edit above //-->

<div >
<a href="http://angelears.crystal-dreams.us/blanksc.png" rel="gallery-mcplush" title="Blankness"><img src="http://seac.crystal-dreams.us/blanksc.png" width="200" height="200" border="0"></a> <br>
Unknown item<br>
        Gotten from: Unknown<br>
        Still Available: Unknown</div>       


<!-- Do not edit below //-->
</td>
<td id="t_gallery_right"> </td>
  </tr><tr>
<td id="t_gallery_bottom" colspan="3"></td>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the process for fetching a specific image from a database folder by referencing its name?

We have a collection of images stored in the uploads folder within the root directory. Our goal is to display a single image for each user profile. Each user's profile image file name is saved in the database table called user under the field profile ...

What is preventing Facebook from merging its CSS/JS files together?

I wonder about the reasoning behind Facebook developers' decision not to consolidate their scripts and stylesheets into single files, opting instead to load them on demand through their CDN. Considering the complexity of Facebook as an application, I ...

Having trouble with submitting the code - need help resolving the issue

I'm facing an issue with my submit cancel code. The JavaScript code I implemented for preventing the submission function on my page isn't working as expected. While it does work to a certain extent, it's not fully functional. I am seeking a ...

Having difficulty stripping HTML tags from the response JSON

Hello, I am new to AngularJS and facing an issue with parsing JSON data. The JSON response contains HTML format data, with tags like <, BR, etc. When checking the response in a browser, it appears fine; however, on devices such as tablets or mobile phon ...

Display a <div> element styled using CSS3

Question: I am facing a challenge with CSS3 styling. I have one class and one div. The class is currently set to display:none, but I want it to show when the mouse hovers over it (display:block). I have attempted the following: .1:hover + div#2 { dis ...

Monitoring WooCommerce order submissions through AJAX

I'm exploring the world of Ajax for the first time. My goal is to submit an order tracking form and show the results using AJAX. I attempted to use Ajax to display the results within div track_result. The issue I'm facing is that the following ...

What is causing the content to overflow outside of the navbar on smaller screens or mobile devices?

/* *{ font-family: sans-serif; box-sizing: border-box; margin: 0; padding: 0; overflow-x: hidden; } */ .main { min-height: calc(100vh - 10rem); display: grid; place-items: center; } p { font-size: 4rem; line-height: 1.6; } nav ...

Adjusting the angular routerLink based on an observable

When working with HTML in Angular, I am looking for a way to use an <a> tag that adjusts its routerlink based on whether or not a user is logged in. Is it possible to achieve this functionality within a single tag? <a *ngIf="!(accountService ...

Form containing unchecked checkbox

I am trying to send a false value via post for a checkbox that is not checked by default. Here is how my checkbox is defined: <label><input type="checkbox" id="rez" name="rezerwowanie" value="false" />Rezerwowanie</label> After submitti ...

I am in need of a blank selection option using an md-select element, and I specifically do not want it to be

I'm currently utilizing Angular Material with md-select and I am in need of creating a blank option that, when selected, results in no value being displayed in the select dropdown. If this blank option is set as required, I would like it to return fal ...

JavaScript (geolocation) error: Unhandled TypeError - Invocation not allowed

Encountering the Javascript error "Uncaught TypeError: Illegal invocation" while executing the code var nativeGeoloation = window.navigator.geolocation.getCurrentPosition; nativeGeoloation(function (){ alert("ok")}); Despite attempting to call the code w ...

I'm having trouble getting my .click method to work with the <div id=menuButton>. Can anyone help me figure out why this is happening?

Here is the HTML code I created for a dropdown menu. Initially, in the CSS file, the menu is set to display: none; <!doctype html> <html> <head> <title>DropDown Menu</title> <link rel="stylesheet" href="normalize ...

Issues arise when attempting to use the Android KeyUp, KeyDown, and KeyPress events in conjunction with Angular2

I am encountering an issue where I consistently receive a keyCode of 229 in Android Chrome browsers when running either: <input type="text" (keydown)="testKeyCodes($event)"/> <!-- or --> <input type="text" (keyup)="testKeyCodes($event)"/& ...

Customizing Bootstrap icon with padding, background color, and radius settings

Struggling with Bootstrap Icons and Bootstrap 5, I attempted to create a perfect circle background behind an icon by setting padding, background color, and a rounded circle radius. The code I used was <i class="bi-globe-americas text-white p-3 bg-p ...

Is it possible to extract information from a string that includes HTML code within a browser using CSS selectors without actually generating the DOM elements?

I've been struggling with this basic task for hours. I can't find any libraries that work and none of the questions here address my specific issue. Here's what I need to do: The entire page's markup is in a string format. I must use ...

Encountering a 422 Unprocessable Entity error when the search bar in the frontend is empty - What is the best way to handle

My frontend setup includes a search bar with an input field By combining HTMX and FastAPI, I am able to dynamically fetch user information from a static list of dictionaries. I aim for dynamic results that update as I type, and the fetching of user infor ...

Using scope in ng-style to manipulate a portion of a CSS property value in Angular

I've been attempting to add a border using ng-style, but I'm struggling to figure out how to concatenate the value from the scope variable. None of the methods below seem to be working for me: <div ng-style="{'border-top' :'1p ...

Storing information in a database without the need for a page refresh using ajax in laravel

My form allows users to input multiple fields and save them to a database using AJAX. Below is the HTML for my form: <form id="paramsForms" method="POST"> {{csrf_field()}} {{ method_field('POST') }} <div class="modal-body" ...

The spacing between images on mobile devices is excessive

My images on mobile have too much space between them: mobile version They appear fine in Dev Tools: dev tools version This is my HTML: <div class="container-fluid"> <!-- <br> --> <div class="row"> ...

The Bootstrap card is elegantly framed by a crisp white border surrounding the

After referencing a tutorial, I implemented the following code: <div class="card" style="width:400px"> <img class="card-img-top" src="image.png" alt="Card image"> <div class="card-body"> <h4 class="card-title">John Doe</ ...