CSS causing alignment issues with buttons

Check out the issue I'm facing:

https://i.sstatic.net/7yMpI.png

The buttons below each section are not aligning properly.

Take a look at my Code:

.locouter {
  width: 100%;
  border: none;
}
.locouter td {
  text-align: left;
  vertical-align: top;
}
.usplit {
  border: none;
  width: 100%;
}
.usplit td {
  width: 33%;
  text-align: left;
  vertical-align: top;
  padding: 15px;
  font: 14px/20px Arial, Helvetica, Sans-serif;
  color: #000000;
}
.usplit td h3 {
  font: 24px/24px DinWebCond, Sans-serif;
  color: #000000;
  margin: 0px;
  text-transform: uppercase;
}
.usplit td button {
  display: block;
  float: right;
  margin-top: 10px;
  outline: none;
  font: 14px/14px DinWebCond, Sans-serif;
  color: #808080;
  border: 1px solid #c0c0c0;
  background-color: #f0f0f0;
  border-radius: 3px;
  cursor: pointer;
  padding: 9px 10px 7px 10px;
  text-transform: uppercase;
...
</table>

Upon closer inspection, you'll notice a series of <br/> tags just before the <button> element. Instead of using CSS positioning, I have used line breaks which is causing alignment issues for the buttons.

Predictably, the breaks in the code are resulting in misalignment of the buttons.

Answer №1

Here are some steps you can take to improve your layout:

  1. Eliminate any unnecessary <br /> tags from your code.
  2. Update your .usplit td style with position: relative; and padding-bottom: 55px;.
  3. Revise your .usplit td button style by adding position: absolute;, bottom: 0;, and possibly removing the top margin of 10px.
  4. Consider using JSFiddle in the future for faster assistance from other users.

Good luck with your project!

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

javascript highchart image carousel

I am currently working on a visual chart project using the JavaScript library highchart. After setting up my chart with some dummy data, I am looking to incorporate functionality that allows for triggering an image slide based on the chart data. Specific ...

``There seems to be an issue with the alignment and vertical placement in both Firefox and IE

I'm currently working on a responsive landing page for a company and running into an issue with the CTA button's position outside of Chrome. It's functioning perfectly in Chrome, resizing as intended: Here is the CSS responsible for this: ...

Issues with Mouse Hover/Image Replacement

In this particular example, I am attempting to achieve a simple functionality where an image changes when the mouse hovers over it, and reverts back to the original image when the mouse is no longer hovering. However, despite my efforts, there seems to be ...

Disordered block elements

I am having trouble centering a div in my footer. When I try to center it, the div ends up floating on top of the footer instead. Here is the link to the codepen. footer { text-align: center; background-color: grey; position: fixed; bottom: 0; width: 100 ...

Difficulties with Bootstrap, JQuery, HTML, and CSS

Currently in the process of revamping a university society's website, I have some experience in web development but nothing too advanced. You can view the current website here: . Here is a sneak peek at the new design I am working on: . However, I& ...

Validating user input fields to display error messages when empty

As part of my program, I need to gather information from users regarding their name and the number of pets they have. If a user enters an empty string, I want to display an error message prompting them to input something and fill the text box with their en ...

Transmitting flawless data to the Angular controller

In my Angular application, I have some checkboxes that are pre-checked and in the ng-pristine state. How can I receive these inputs in my controller without marking them as dirty when the form is submitted? <input type="checkbox" name="c1" name="favor ...

Alter the div's color when it is clicked by the user

When a user clicks on any of the divs, I want to change its background color. Additionally, I want the first div to be active by default with a colored background. The code I am using is as follows: .tabs.active a { background: black; } <div class ...

Creating HTML Email with PHP

Having some trouble with sending HTML emails using PHP. Everything seems to be working fine on Gmail, Yahoo, etc. However, when using my cpanel (Horde Email Client), the text is appearing as an attachment and not displaying any body content. Here are the ...

How can you adjust the zoom level to 100% on an Android Webview?

Using Anddown to convert markdown to HTML and wanting to display it in a webview on a tablet screen, I encountered an issue. The webview, within a fragment, takes up half the screen in landscape mode. The challenge was getting the HTML content to appear a ...

Why isn't my HTML reflecting the CSS changes I've made?

My CSS code is not applying to the HTML in general, only to h1 and h3. I have used similar looking code before and it worked fine. html { text-align:center; border:25px dotted #ff5c33; background-color:#00b300; color:#ff5c33; font-fami ...

Is it possible to achieve efficient Autocompletion features within VS Code?

Just had my first experience with PhpStorm and I must say, I'm impressed, especially with the completion feature. Pressing Ctrl + Space on my Mac gives me relevant suggestions, like when I'm in a JS file and my project includes jQuery, I get Ele ...

Using AngularJS to bind events on key presses

Currently, I am working on an SVG application using AngularJS. We are in the process of making a few adjustments to fully support our internal browser, but so far everything seems to be functioning properly. Feel free to check out my demo: http://jsfiddle ...

Changing text color dynamically when hovered over by referencing retrieved data

Hello, I'm having trouble with applying a className based on database values and using it in CSS for custom hover color. Can anyone assist me? ...

Achieving vertical centering for content within :before/:after pseudo-elements

I'm striving to replicate a similar layout as shown in the image: Within a div element containing an image as part of a slideshow, I have utilized :before and :after pseudo-elements to create controls for navigating to the next (>>) or previous ...

Guide to swapping images on button click in HTML with dynamically changing image URLs retrieved from the server

I am a beginner in client-side scripting and new to Stack Overflow. I am looking for guidance on how to change an image within a div element upon clicking a button or anchor tag. Here is the code snippet I have written to achieve this: $scope.captchaCha ...

retrieving embedded content from an iframe on Internet Explorer version 7

Need help with iframe content retrieval $('.theiframe').load(function(){ var content = $(this.contentDocument).find('pre').html(); } I'm facing an issue where the iframe content is retrieved properly in FF, Chrome, and IE 8,9 ...

How to incorporate an image as a background in a Bootstrap 4 card

I'm working on achieving a specific design, as shown in the image https://i.sstatic.net/GRjwo.jpg In Bootstrap 4, it's simply a group of cards with the "card-img-overlay" class. The issue arises when the height of the card is dependent on the im ...

My extensive AngularJS application is suffering from sluggish performance, attributed to an overwhelming number of files and

After developing an AngularJS application with multiple JavaScript files, I encountered a bottleneck. Chrome restricts the number of TCP connections to 6 at a time, causing additional requests to wait until the initial 6 are completed. This leads to signif ...

Text wrapping to the right of an image in Bootstrap columns

I'm struggling with getting a large block of text to display correctly on the right side of an image. The text keeps dropping below the image when it reaches a certain size or if no width is specified. Adding a fixed width to the text column seems to ...