Is there a way to display my <i> tags inline without any issues?

I am facing an issue with my code and need assistance. I have two links that I want to display but my code doesn't seem to respond as expected.

The first link is: https://i.sstatic.net/fryPH.png

The second link is: https://i.sstatic.net/j849M.png

Additionally, the background color in my code is just for testing purposes. Here is a snippet of my CSS:

/*Barra de Navegação - Inicio*/
header{
    background-color: rgb(180, 177, 172);
}
.nav-link{
    margin: 6px;
    padding: 0px;
    color: white;
    padding-top: 10px;
}

.container-fluid{
    margin-left: 30%;
}
/*Barra de Navegação - Fim*/

/*Perfil - Inicio*/
#perfil div img{
    width: 100%;
    margin: 20px;
}

#textos-objetivos{
    margin: 20px;
    margin-bottom: 20%;
}

#textos-objetivos p {
    margin: 20px;
}
.negrito{
    font-weight: bold;  
}

.redesSociais{
    margin: 20px;
    display: inline;
}

.redesSociais i {
    background-color: chocolate;
}
/*Perfil - FIM*/

The main problem occurs when trying to set the display: inline; property within the .redesSociais i class and other places, but it seems to default to a block display. Can someone help me identify where I went wrong in my code?

Answer №1

The problem lies in the structure of your code. Bootstrap requires that a row must always be accompanied by a column.

Currently, you have:

<div class="row redesSociais">
    <h2>Redes Sociais</h2>
        <i class="fa fa-facebook-official" aria-hidden="true"></i>
        <i class="fa fa-twitter" aria-hidden="true"></i>
        <i class="fa fa-instagram" aria-hidden="true"></i>
    </div>
</div>

However, it should be structured like this:

<div class="redesSociais">
    <h2>Redes Sociais</h2>
        <i class="fa fa-facebook-official" aria-hidden="true"></i>
        <i class="fa fa-twitter" aria-hidden="true"></i>
        <i class="fa fa-instagram" aria-hidden="true"></i>
    </div>
</div>

Simply remove the row class to resolve the issue.

Answer №2

.socialMedia i{
  visibility : visible !important;
}

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

comparing values in an array with jquery

I am attempting to retrieve the phone number and mobile number from an array using jquery. jQuery: var data = $('#PhoneLabel').text(); var array = data.split(', '); $.grep(array, function (item, index) { if (item.charAt(0) === &ap ...

Different sizes of CSS tables

Creating a responsive layout involves displaying <div> boxes within a grid: The six individual boxes on this page are placed in a row within the HTML source: <div class="control"> <div class="controlContent"> <a>VARIABLE-HEIGHT CO ...

Troubleshooting: My Bootstrap collapse navbar refuses to cooperate

Hi there! I'm working on creating a responsive navbar with Bootstrap, but I'm having trouble getting the collapse feature to work. Can someone please assist me? Here are the lines of code I have: <nav class="navbar navbar-expand-md navba ...

Hover over an element repeatedly to trigger an action with jQuery, as opposed to just once

Is it possible to have my p tag transition whenever I hover over it? I am looking to create a hover effect on an image that displays text in a div tag with scaling transitions. Can someone assist me with this? Instead of using jQuery or JavaScript to dyn ...

Do you have a title for the pre code section?

When it comes to tables, there's a <caption>, and for figures, there's a <figcaption>. But what tag should be used for pre? (The goal is to provide a caption for a listing, but since the <listing> tag has been removed, <pre& ...

jQuery UI Sortable: Efficiently Drag Items Across Multiple Interconnected Lists

One feature of using jQuery UI Sortable is the ability to make the sortable item container scroll when an item is dragged. This can be achieved by specifying the scroll option. In my case, I have several sortable lists that are connected within separate c ...

Unable to Upload Image to MySQL Database

I encountered an unidentified index error when trying to upload images. I added a check to prevent the error, but the images are still not being uploaded. I have tested with legitimate images, but nothing seems to work. I've been struggling with this ...

Issue with mobile.changePage() function not executing as expected

I created a basic code that generates a "Splash screen". For storing my data, I am utilizing localstorage. When I first load it, I retrieve data from a URL and I am able to navigate to different pages using $.mobile.changePage(). However, if the data is a ...

Sliding out the sidebar menu with Jquery

Hey there! I'm currently working on implementing a swipe feature for the side menu bar. I have already added a click method in my code, but now I also need to incorporate a swipe technique. When the side bar is opened, I want to remove the inside im ...

Issue with mouseMove function not aligning correctly with object-fit:contain CSS property

My current code allows users to select a color from an image when hovering over the pixel with the mouse. However, I am encountering an issue where the colors do not map correctly when using object-fit: contain for the image. The script seems to be treatin ...

Unable to run a Bash script using PHP

I'm currently facing a challenge while attempting to run a simple Bash Script from within a PHP script. The process involves collecting data from an interactive HTML5 front-end page, transmitting it through ajax to the PHP script, parsing the variable ...

Clicking on the background does not alter the onclick function

Can anyone help me troubleshoot my code? My function load() isn't changing the background of .firstDiv for some reason. I've checked multiple times but I can't seem to spot any errors. function load() { document.getElementsBy ...

The items are misaligned in a horizontal position

The 4 divs are styled with a width of 23% and displayed using inline-block. They have a fixed height of 220px and no margin applied. However, the issue arises as they are not aligning horizontally Despite attempting to adjust the height and width paramete ...

Javascript code creates a blur effect on webpage bodies

On my webpage, I have multiple elements, including a "change BG" button. When this button is clicked, I want to hide all other content on the page except for the button using JavaScript. Alternatively, clicking the button could blur out all other elements ...

How to use Jquery to fetch the value of a td element nested inside another

After consulting the manual, I am trying to find a way to extract the value in the second column of a table when a specific span is clicked. However, the challenge is that the click event is currently being triggered by the first span cell. Here is the jQu ...

MUI: Issue with pseudo element appearing cropped outside of Paper container

I am facing an issue where a red arrow pseudo element '::before' is partially cut off outside its container '.MuiPaper-root'. I need the arrow to remain visible, any suggestions on how to fix this? Here is the relevant code snippet and ...

Receiving a null value when attempting to access the ids of dynamically created HTML elements using JavaScript

Encountering issue with accessing ids of dynamically generated HTML elements using javascript In my current project, I am attempting to dynamically alter the ids of div elements and remove buttons that are appended to the parent div. The desired functiona ...

Implement a full-width dropdown menu with Bootstrap 4

Hey guys, I'm having a real head-scratcher here. I've created a dropdown menu using Bootstrap 4, but I'm having trouble making it responsive for mobile screens. I've tried using media queries to make the dropdown menu occupy 100% width ...

Ensure that only one menu with a specific class is open at any given time

My goal is to ensure that both menus cannot be open simultaneously. The desired behavior is as follows: When one menu is already open and you click on another, the first one should automatically close. For a better understanding of what I am trying to achi ...

Accessing JavaScript cookie within .htaccess file to establish redirection parameters according to cookie content

Is there a way to modify the rules within my .htaccess file so that it can properly read a user-side cookie and redirect based on its content? The scenario is this: I have a cookie called userstate which contains an abbreviation of US states, such as AL ( ...