Experiment with a variety of designs using HTML and CSS

Struggling with HTML and CSS, I need help achieving the layout shown in the image. How can I use different layouts in a div or organize the controls like in the picture? I'm more familiar with Android layouts, so this is a bit confusing for me. Any assistance would be greatly appreciated.

layout

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8>
    <title>Title</title>

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.1/css/bootstrap.css">
    <link rel="stylesheet" href="https://cdn.datatables.net/1.10.19/css/dataTables.bootstrap4.min.css">

    <style>

        form{
            display: inline-block;
        }

        .botones{
            padding: 10px 10px;
            vertical-align: middle;
            /**margin-left: 30px;**/
        }

        #botonNuevo{
            margin-top: 5px;
            margin-bottom: 5px;
        }

    </style>

    <script>

        $(document).ready(function () {
            $('TablePersonal').DataTable();
        })

        $(TablaPersonal).DataTable

    </script>

</head>
<body>

<div class="container">

    <div class="row">

    <div>

        <form>
            <table id="TablaPersonal" class="table table-striped table-bordered" style="width:100%">
                <thead>
                    <tr>
                        <th>No. Expediente</th>
                        <th>No. Empleado</th>
                        <th>Nombre</th>
                        <th>RFC</th>
                        <th>Teléfono</th>
                        <th>Puesto</th>
                        <th>Lugar de Asignación</th>
                        <th>Estatus</th>
                    </tr>
                </thead>

                <tbody>
                    <tr>
                        <td class="marker">1</td>
                        <td>1</td>
                    </tr>
                </tbody>
            </table>
        </form>
    </div>

    <div class=" btn-group botones">
        <button id="botonNuevo" type="button" class="btn btn-primary btn-block">Nuevo</button><br>
        <button type="button" class="btn btn-primary btn-block">Inactivar</button><br>
        <button type="button" class="btn btn-primary disabled btn-block">Modificar</button><br>
        <button type="button" class="btn btn-primary disabled btn-block">Exportar</button><br>
        <button type="button" class="btn btn-primary disabled btn-block">Eliminar</button><br>
    </div>

</div>

</div>

</body>
</html>

Answer №1

To utilize the Bootsrap Grid System efficiently, refer to the guidelines provided in this resource. Ensure that you enclose your table and button within a row using the code <div class="row">. Place your table within <div class="col-sm-8"> and wrap your button with <div class="col-sm-4">, adjusting the button width accordingly. Familiarize yourself with the bootstrap grid system through their documentation for better understanding. I have also removed the style for #bottonNuevo, but feel free to make adjustments as needed. Similarly, when it comes to the search button and form, experiment with the bootstrap grid system to achieve desired results.

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

The functionality of my website is not optimized for viewing on iPhones

While designing a responsive website that looks great on most devices, I noticed some issues with iPhones. The layout breaks in two specific ways on these devices. View Galaxy Screenshot View Sony Screenshot The menu doesn't scale properly on iPho ...

Looking to create a dynamic Angular reactive form using API response data? Seeking guidance on how to achieve this? Let's

[ { "name": "jkjk", "firstName": "hgh", "lastName": "ehtrh", "replytype": "svdv", "prodCode": "svv", "execu ...

How can one adhere to Angular's recommendation of "always using dots with ngModel" while working within isolate scopes?

Currently, I am working on developing an Angular application utilizing Bootstrap. To reduce the impact of Bootstrap on my HTML code, I have implemented two directives specifically for forms: form-control.js module.directive('formControl', func ...

The clash of names between tags and classes in Tumblr themes can cause conflicts

I have discovered a method to customize the style of different posts based on their respective "#tags" using {TagsAsClasses}: <div class="post {TagsAsClasses}"> div.tag { /* customize styling here */ } While this approach works well, I encount ...

How to center align a Bootstrap 4 Navbar using CSS

Having trouble center-aligning your Bootstrap 4 navbar in your Angular code base? You're not alone. I too wanted to reduce the gaps between menu items when transitioning from one to another. Below you'll find snippets of my HTML, TS, and CSS: M ...

Dynamically created span element in script facing issues in MVC application

I have a single MVC project where, in the BusinessPosition.cshtml file, I am dynamically creating a tree view at runtime. By default, it displays the main child of the root node upon page load, like this: <ul class="col-lg-20 col-sm-12 col-xs-12" style ...

adjusting the size of the sidebar at the top to ensure that it does not overlap the top menu

I have a sidebar on my page that opens vertically when I click a button. The sidebar covers the company logo and name, so I want to make it smaller. Here is the code for the sidebar: <body> <nav class="navbar navbar-dark bg-dark" ...

Adding a class to an element within a React template using JS is not possible

I am currently using a Bootstrap template for my React app. Within the template, there is a JavaScript code that should make the header sticky when scrolling. It functions as expected in pure HTML, but once I move the header to a React template (necessary ...

Iterate using jQuery through all child div elements

<div id="SelectedSection" class="selected"> <div class="sec_ch" name="7"> <div class="sec_ch" name="8"> <div class="sec_ch" name="9"> <div class="sec_ch" name="11"> <div class="clear"> </div> </di ...

Google Web Fonts: Exploring the World of Font Weight Variations

It's quite puzzling as to why the weight of my Google web font in the navigation menu keeps changing on different pages even though I have specifically set it to 700. The CSS for the menu is exactly the same across all pages. Can anyone shed some ligh ...

Here is a unique rewrite:"Adjusting the prop of a Material UI Button component depending on screen size breakpoints can be achieved by utilizing

While using the Material UI Button component, I encountered an issue with conditionally determining the variant of the button based on screen size. Specifically, I want the variant to be 'outlined' on medium and larger screens, and no variant at ...

Utilizing and transmitting contextual information to the tooltip component in ngx-bootstrap

I am currently working on integrating tooltips in ngx-bootstrap and trying to figure out how to pass data to the ng-template within the tooltip. The documentation mentions using [tooltipContext], but it doesn't seem to be functioning as expected. Belo ...

How to align text to the right in Bootstrap 4

I'm having an issue with my text alignment when using the original bootstrap CSS. Instead of aligning left and right, the text is simply displayed side by side. .text-left { text-align: left!important } .text-right { text-align: right!impor ...

Confusion Arises When Joomla Buttons Clash

I am facing an issue with two modules on my website, each containing a button code. The code for the buttons is as follows: First Button <div onclick="parent.location='first-link'" data-mce-onclick=""><button class="button">First Bu ...

When the fullscreen modal is opened, the initial image displayed is not the same as the one that was clicked on

Seeking assistance: I've been struggling with a problem for quite some time now and could really use some help from you guys. My issue involves an 'AngularJS' webapp that retrieves posts from an 'FB page' via 'OpenGraph' ...

Conceal Bootstrap Toast for a day following dismissal

I have implemented Bootstrap 5 toasts to showcase an advertisement on my website. The goal is to make the advertisement disappear for 24 hours once the user closes it. Here's the current code snippet: <div class="position-sticky bottom-0" ...

A mysterious underscore suddenly materializes within Font Awesome icons when used in HTML

Currently, I'm working on the footer section of a webpage using HTML and Bootstrap 5.3.0. I encountered an issue where an underscore appears next to the icons when I add them. I suspect that this is due to the white spaces between the elements, which ...

Update the function to be contained in a distinct JavaScript file - incorporating AJAX, HTML, and MySQL

Currently, I am working on a project and need to showcase a table from MySQL on an HTML page. The JavaScript function in my code is responsible for this task, but due to the Framework 7 requirement, I must separate the function into a different .js file ra ...

Leveraging .col-* within a .d-flex container in Bootstrap 4

What is the recommended practice for using .col-* as children in a .d-flex container? Should .d-flex be used with .row instead? I have noticed that the Bootstrap 4 Docs do not show any examples of using a .col-* in a .d-flex container. The layouts provide ...

Steps for setting all textareas on a website to "readonly" mode

My website contains numerous textareas but they currently do not have the read-only attribute. It would be very time-consuming to manually add the readonly attribute to each one. Is there a more efficient method to make all textareas read-only? ...