What are the steps to create a responsive element with bootstrap and css?

I have a unique setup where I have text on the left side and two ellipses/circles on the right side. I need these circles to be responsive. You can see a live demo on jsfiddle here

Below is my current code:

HTML

<div class="container">
   <div class="row">
       <div class="col-lg-6 col-md-12 col-xs-12">
          left content
       </div>

        <div class="col-lg-6 col-md-12 col-xs-12">

         <div class="c1">
            <div class="connect1"></div>
            </div>

          <div class="c2">

          </div>
         </div>

    </div>
</div>

CSS

.c1, .c2 {
  border-radius: 50%;
  width: 200px;
  height: 200px;
  background: aqua;
  position: absolute;
}

.c1 {
  left: 20px;
  top: 50px;
}

.connect1 {
  position: absolute;
  right: -80px;
  top: 130px;
  background: orange;
  border-radius: 50%;
  width: 40px;
  height: 40px;
}
.connect1::before, .connect1::after {
  content: '';
  display: block;
  background: orange;
  height: 10px;
  position: absolute;
  z-index: -1;
}
.connect1::before {
  width: 200px;
  top: -20px;
  left: -180px;
  transform: rotate(20deg);
}
.connect1::after {
  width: 200px;
  right: -160px;
  top: 70px;
  transform: rotate(35deg);
}

.c2 {
  left: 300px;
  top: 180px;
}

When viewed on a mobile device, the code above displays as shown in this image here: https://i.sstatic.net/JA51Y.png

The expected result on a mobile device should look like this: https://i.sstatic.net/A4ilY.png

Answer №1

The circles will not adjust to different screen sizes because they are set with a fixed width and height. Additionally, their absolute positioning with specific distances further prevents them from being responsive.

If you have already taken a screenshot, save it as a jpg image and insert it into the html code like this:

<img src="screenshot.jpg" class="img-w100 img-responsive" alt="">

.img-w100 {
  display: block;
  width: 100%;
}

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

An error with rendering in Internet Explorer 8

When I hide a td in a table by setting its display to none, the table does not resize correctly when using IE8. If I have a table and want to remove an entire column, I might try something like this: $("th:first, th:last, tr td:first-child, tr td:last-ch ...

Hide offcanvas menu upon clicking on anchor links

Issue arose when the offcanvas menu remained open after clicking an anchor link. To resolve this, I implemented the following code for an onclick event: function close_offcanvas() { var element1 = document.getElementById("eff_nav_toggler&q ...

Struggling to use the innerHTML method to update a div within another div element?

<!DOCTYPE html> <html> <head> <title>Business Information Card</title> <script type="text/javascript"> window.onload = init; function init(){ var button = document.getElementById("populate ...

Angular 10: A guide to dynamically highlighting navbar elements based on scrolling position

I am currently working on a single-page application using Angular 10. I have a simple page layout and I want to implement a feature that will highlight the navbar based on the scroll position. How can I achieve this functionality in a single-page applicati ...

Ways to recover HTML elements that have been eliminated by jQuery's remove

$(document).ready(function() { $('#remove').click(function() { $('.test').remove(); }); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div class="test-wra ...

Position the div alignment to the top within the table cell

I'm having trouble aligning the div under the header to the right. Here is my HTML code and a photo for reference: HTML Code: <td> <div class="schedule-content"> <div class="timestamp& ...

Why isn't my easypie number displaying on the inside?

I am currently utilizing the easypie plugin, but I am facing an issue where the number is not displaying inside the pie chart. Despite trying multiple solutions, I haven't been able to resolve this. How can I successfully display the number inside the ...

Changing the position of the icon in the bootstrap validator

I'm currently attempting to validate form fields in a web project. The goal is to achieve a specific result, similar to the image below: https://i.stack.imgur.com/EVeJf.png While I have made progress with a simple solution that almost meets the requi ...

Increasing the size of iframe in a Flexbox layout

I'm facing a challenge in making the iframe element stretch to occupy the remaining space within my web application. While I have ensured that the maximum space is allocated for the div by setting a border, the iframe's height does not automatica ...

Set the size of the website to remain constant

Is it possible to keep your website at a consistent size so that when viewed on a larger screen, it simply adds more background or space to the page? (I prefer not to use media queries to change the style as the screen size increases) ...

Can you tell me which BBC channel is airing this animation?

Is anyone familiar with the animation on the login screen of BBC when entering the day, month, and year? Check it out here: ...

Encountering [Object] error in Angular's ngbTypeahead functionality

Here is the code for my input field in component.html: <input type="text" class="form-control" [(ngModel)]="searchQuery" [ngbTypeahead]="recommends" name="searchQuery" typeaheadOptionField="user ...

Hover Image Grid

Having trouble with creating an image grid that displays text on hover? Check out the issue I encountered with my layout: https://i.sstatic.net/PVDzB.jpg For some reason, the text is not aligning properly on the image, causing a layout problem. Any assist ...

Programme for Server Login

After creating my own server, I attempted to implement a login feature to restrict access to its files. Unfortunately, using Javascript for this task proved to be insecure as usernames and passwords could easily be viewed in the source code: <form name ...

Reduce the width of the <h3> element

I need help adjusting the width of the <h3> HTML body { font-family: Arial, sans-serif; background-color: #f0f0f0; margin: 0; padding: 0; overflow: hidden; } header { ...

Extract the <br /> tag exclusively from the content inside the div

My experience with WooCommerce has led me to the need to include <br> within a product name. However, this break appears differently as <br /> in the .woocommerce-breadcrumb element. This is what the breadcrumb currently display ...

Emphasize any word starting with an @ symbol to highlight its importance

My goal is to enhance the appearance of words that begin with an "@" symbol by making them bold. For example, transforming the sentence: '@xyzharris has a cat @zynPeter' into: '@xyzHarris has a cat @zynPeter' ...

The unique format created by tinyMce is not being displayed

I am trying to customize the style format of my tinyMCE, but I am having trouble getting it to show up. Can anyone suggest what might be going wrong? Where should I place the button "Formats" so that I can choose a specific style? tinyMCE.init({ mod ...

Attaching a buoyant div to the precise location of a different element

I have a unordered list (ul) with individual list items (li) that are displayed within a scrollable container. This means that only 8 list items are visible at a time, but you can scroll through them to see the others. Each list item (li) has an "edit" b ...

Ensure that the JavaScript is loaded prior to refreshing the webpage

Below is the HTML code snippet: <script src="https://maps.googleapis.com/maps/api/js?key=mykey&callback=initMap&v=quarterly" defer></script> <script src="{% static '/javascript/maplanguage.js' %}">< ...