Transitioning to a bootstrap or fluid design from a foundation of simple HTML and CSS

Although I am not a web designer by trade, I have a background in statistics and am currently working on building a website. I have sketched out the layout structure I desire using basic html and simple css to kick things off. However, upon further exploration, I've come across frameworks like bootstrap that offer a more polished look and feel, prompting me to consider transitioning in that direction. My main query now is how can I recreate this existing structure using bootstrap?

The HTML File:

<html>
<link rel="stylesheet" type="text/css" href="layout.css" media="screen" />
<div class="container">
    <div class="user_stats">
        User Statistics
    </div>
    <div class="hunt">
        suggestions
    </div>
    <div class="personal">
        personal
    </div>
</div>
</html>

.container {
    width:960px;
    margin:0 auto;
}

.user_stats, .personal, .hunt {
    background-color:#aaa;
    margin:0 0 5px 5px;
}

The CSS File:

.user_stats, .personal {
    width:400px;
    float:left;
}

.user_stats {
    height:200px;
}

.personal {
    height:300px;
}

.hunt {
    width:550px;
    height:505px;
    float:right;
}

I also intend to incorporate placeholders for images in both the 'personal' and 'suggestions' sections (referenced as such in the CSS), with the boxes having scroll bars.

Below is a preview of how it appears based on my current code:

Answer №1

To create the layout you want, your code should look something like this:

<div class="container">
 <div class="col-md-5">
   <div class="row">User Statistics</div>
   <div class="row">Personal</div>
 </div>
 <div class="col-md-7">
   Suggestions
 </div>
</div>

Don't forget to include a link to bootstrap.css in order to access the grid classes.

If you want each div to have scrollbars, apply the following class to the desired divs:

.scrolldiv {
height:550px;
overflow-x: hidden;
overflow-y: auto;
}

For example:

<div class="col-md-5">
 <div class="row scrolldiv">User Statistics</div>
 <div class="row scrolldiv">Personal</div>
</div>
<div class="col-md-7 scrolldiv">
 Suggestions
</div>

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 footer is floating somewhere in the middle of the page, not at the bottom

Currently working on a webpage with the Twitter Bootstrap Framework. The footer is supposed to be at the bottom of each page with lots of content, but on one sub-page it's appearing in the middle instead: http://gyazo.com/45232ab25cdeb7705f9775a969051 ...

Deciding whether to use Device WebView Kit or HTML for your project is

I am a bit confused about creating a website for mobile devices. If I have a specific webpage in mind that I want to target towards mobile devices, do I need to use the native webview kits provided by iOS, or can I simply code in HTML, PHP, Javascript, an ...

Unable to switch the text option

[Fiddle] I'm currently working on a project where I want pairs of buttons to toggle text by matching data attributes. While I can successfully change the text from "Add" to "Remove" on click, I am facing an issue with toggling it back to "Add" on the ...

What is causing such a delay in this AJAX request?

It typically takes around 2-4 seconds to complete, which seems excessive for its task. Below is the AJAX code: $("#IngTable").html("<center><img src=../img/loading.gif /></center>"); var search = document.getElementById("IngSearch") ...

The autocomplete feature in Laravel that relies on Ajax is sluggish

My form has an autocomplete feature that is functioning slowly. Even with an average typing speed, I can type faster than the suggestions load. The feature utilizes jQuery to make an ajax call to a URL, which triggers a function in a controller to generate ...

Issue with iPad Pro displaying Bootstrap 4 Navbar toggle icon

Having trouble with my Bootstrap 4.1.1 navbar on iPadPro. It's not displaying the correct data from the div and it's not collapsing properly. However, it works fine on small devices. Any suggestions on how to fix this issue? Here's the code ...

Is it possible to incorporate Google icons within Freemarker?

https://i.stack.imgur.com/Pv2T4.pngI'm having trouble using Google icons in my project. Can anyone help me figure out how to fix this? UPDATE: Here is a snippet of my HTML template: <?xml version="1.0" encoding="UTF-8"?> < ...

How can the cross-domain AJAX form submission be achieved?

I am currently utilizing jQuery along with the jQuery form plugin Within the jQuery form plugin, there is a method called ajaxSubmit. This method allows you to submit a form via ajax and receive a response. I find it intriguing how this process works even ...

Using JavaScript to implement CSS3 with multiple background images

Is there a way to programmatically define multiple background images in CSS3 using JavaScript? While the common approach would be: var element = document.createElement( 'div' ); element.style.backgroundImage = "url('a.png') 0 100%, ur ...

Prevent jQuery's change event from propagating submission

Dealing with a small form here. I want to validate the input both when it changes and when submitted. Specifically, I'm checking that the input number is greater than a certain minimum value. If it's below the minimum, it should be automatically ...

Trouble with CSS: struggling to remove the bullet point from the <li> tag

I have created a CSS style for the layout of my basic document: div#content li { font-size:95%; list-style-image:url(/css/bullet_list.gif); line-height:1.5; } Further down in another document, I've included a CSS file that defines .code ...

The images are positioned within the middle of the page, directly beneath the sidebar, rather than at the top. (Vue.Js)

I'm currently working on a Vue.JS photo website and I've hit a roadblock as described in the title. Despite trying various solutions, after spending two hours back and forth with ChatGPT, I've decided to seek help here. Below is the code sn ...

Troubleshooting Highcharts container selection problem on Nexus 7 running version 4.2.1

Having a problem with Highcharts on my Nexus 7. When I touch the chart, the entire thing gets selected with a blue overlay, but this doesn't happen on other devices like the Nexus 4. Even when I try accessing demos from Highcharts website, the issue ...

Flexbox functionality with a specific focus on Kindle Fire device compatibility

I'm curious about the support for flexbox on Kindle devices and looking for more information on overall support. It seems that some properties like display:flex and flex-wrap:wrap/nowrap are not supported, at least on older Kindle Fire devices (newer ...

If the element contains a specific class, then replace the text within the element with a new set of words

Looking for a solution: <form id="new_user"> <div id="first-name"> <label for="user_profile_attributes_first_name"><abbr title="required">*</abbr> First name</label> </div> </form> I need to change the text ...

The Django static CSS won't load properly on the webpage

Despite browsing various posts related to my issue, I have been struggling to resolve the problem at hand (for instance, following this informative post: Django static files (css) not working). The challenge lies in getting my static CSS file to load prope ...

Why do identical elements show different scrollHeights when overflowed and how can this discrepancy be resolved?

I am using a plugin that generates a <p> element and continuously fills it with the content from a <textarea>. This plugin positions the <p> directly below the <textarea>, and styles them so that they appear identical in terms of th ...

Guide to implementing this specific design using CSS within jQuery Mobile

Want to achieve the red circle effect using CSS. Currently working with jQuery mobile and AngularJS. Below is a snippet of my code: <div data-role="page" id="p2"> <div class="ui-bar ui-bar-d "data-role="header" > <a href="" data-role=" ...

Develop a custom input field feature that utilizes both JavaScript and CSS

I really appreciate the feature that allows me to resize the textarea by simply clicking and dragging on the slanted lines in the lower right hand corner. However, I am looking for a way to apply CSS styles to text which is not possible with a textarea. ...

What could be the reason for Jquery post not successfully transmitting data?

So, I've encountered a very strange issue. I'm creating an object and sending it to the server, but for some reason, the data is not coming through (the JSP getParameter function is returning null). var _formData = { "u_id": user.userId, ...