The custom styling in custom.css is not taking precedence over the styles defined in

My site is experiencing some element overwriting when I include css/bootstrap.min.css, such as 'a' tags, the .nav bar, and fonts used on the site. Load order:

<link href="css/bootstrap.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="custom.css">
    <link rel="stylesheet" href="styl.css" type="text/css" />
    <link href="css/fontello.css" rel="stylesheet" type="text/css" />
    <link href="https://fonts.googleapis.com/css?family=Oswald:400,600&display=swap&subset=latin-ext" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

html :

<div class="wrppr">
        <div class="header">
            <div class="logo">
                <img src="LOGO.png" style="vertical-align:middle;height: 250px; width: 250px; float: left">
                <span style="vertical-align:middle;"></br>Voodoo Doll Ink Studio</span>
                <div style="clear:both"></div>
            </div>
        </div>
        <div class="nav">
            <ul>
                list here
        </div>
        <div class="image">
            <img src="tatofront.jpg" style="opacity: 0.6"/>
        </div>

        <div id="opis">
        <p></p>
        </div>
        <div style="clear:both"></div>

        <div id="option2">
            <a href="#">
                <div id="ig">
                    <i class="icon-instagram"></i>
                </div>
                <div class="txt">Check out our Instagram!</div>
        </a>

    <script src="https://snapwidget.com/js/snapwidget.js"></script>
    <iframe src="https://snapwidget.com/embed/786091" class="snapwidget-widget" allowtransparency="true" frameborder="0" scrolling="no" style="border:none; overflow:hidden;  width:100%; "></iframe>
        </div>
        <div style="clear:both"></div>
            <div id ="option3">
                <div class="logobot">
                    <img src="duda.jpg" style="height: 300px; width: 300px;">
                </div>
                Description about piercing and pricing here
            </div>
        <div style="clear:both"></div>
        <div id ="option4">
                <div class="logobot">
                    <img src="duda.jpg" style="height: 300px; width: 300px; float:right;">
                </div>
                Description about dreads and dreadlocks here
            </div>
        <div id="option5">  
            <div class="logobot">
                <img src="LOGO.png" style="height: 300px; width: 300px;">
        </div>
        <div style="clear:both"></div>
        <div class="footer">
            VOODOO DOLL INK
        </div>

    </div>

Most elements are displaying correctly, but a few are being overwritten: the 'a' tag remains unchanged, the logo text alignment is affected, nav text shifts lower and is not centered. Elements overridden by bootstrap.min.css in custom.css:

a { 
  color: white; 
  text-decoration: none; 
  display: block; 
}
.logo
{
    font-weight: bold;
    vertical-align: middle;
    width: 1000px;
    font-size: 72px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}
.nav
{
    padding: 10px;
    width: auto;
    border-top: 1px solid rgb(38, 38, 38);
    border-bottom: 1px solid rgb(38, 38, 38);
    top: 0px;
    z-index: 100;
    height: 40px;
    margin-left: auto;
    margin-right: auto;
    font-size: 20px;
    text-align: center;
    background-color: #0a0a0a;
}

This is my first attempt at creating a responsive site or using bootstrap.

Answer №1

If your stylesheet files are located in the public/css directory, make sure to include the following code:

<link rel="stylesheet" href="css/custom.css">

Remember that when specifying the href attribute, the starting point is the public folder. For more information, check out this resource here.

Additionally, there appears to be a typo on the third line:

<link rel="stylesheet" href="styl.css">
->
<link rel="stylesheet" href="style.css">

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

I find myself grappling with the styling issue in MUI select

<FormControl> <Select labelId="unique-label" id="unique-id" value={1} className={styles.uniqueCustomSelectRoot} IconComponent={() => <MyUniqueIcon />} sx={{ " ...

Styling problem arises on IOS devices due to rounded corners affecting select box

The dropdown menu I am using to "sort products" on our WordPress website is causing some styling issues specifically on IOS devices. I would like the dropdown menu to have rounded corners. It seems to display rounded corners on IOS, but it still shows the ...

Personalize the hover effect of CardActionArea

I'm attempting to personalize the hover effect of material-ui's CardActionArea for a specific component in my React application. Unfortunately, I am struggling to locate detailed documentation on how to style it effectively. Even after experimen ...

Slideshow plugin glitch on Safari and Opera caused by jQuery implementation

My current project involves utilizing a fantastic plugin called Sequence.js for creating animations and transitions with CSS3 based on jQuery. I have set up a simple responsive fadeIn-fadeOut slideshow using this plugin. While everything works smoothly an ...

Upon selecting multiple checkboxes, corresponding form fields will be displayed based on shared attributes

When multiple checkboxes are selected by the user, corresponding form fields should appear based on the checkboxes. For example, if both flight and hotel checkboxes are checked, then the full name and last name fields should be displayed while other fields ...

Tips for eliminating the ripple effect when clicking on a q-list item

I have managed to create a sleek sidebar with a curved edge that seamlessly integrates into the body of the page. However, I am struggling to remove the semi-transparent ripple effect that appears when clicking on a list item. The current effect clashes ...

Place the text below the adaptable div

Could anyone offer guidance on how to properly align text underneath responsive images within divs? The issue I'm facing is that the divs adjust smoothly based on the viewport size, but the text below them doesn't stay centered as intended. Whi ...

The table contained within a row-spanning cell fails to fully occupy the cell's height across different browsers

Chrome rendering and code issue I'm struggling to understand why the nested table (highlighted in red) is not taking up the full height of the outer table cell (highlighted in green) which spans 8 rows. This used to work fine, but newer browsers are ...

Unable to align text in the middle of the header

Seeking help with my design flaws, I have created a fiddle to showcase the issues that arise when attempting to make it responsive. The main problem is that the HEADING IN CENTER text is not aligned properly in the center. If I remove the position attribut ...

Tips for inserting manual line breaks in justified text

My task involves taking a 5-page story from a Word document and implementing it on a website. #reading { hyphens: auto; text-align: justify } <div style="font-size: 20px; width: 750px; margin-bottom: 4em;" class="reading" id="reading"> TextT ...

Is it possible to exclusively target a child div using JavaScript in CSS, without affecting the parent div?

I'm in the process of developing a calendar feature where users can select a specific "day" element to access a dropdown menu for time selection. The functionality is working fine, but I've encountered an issue. When a user selects a time from th ...

Applying CSS transformations to scale up a div within its parent body

Having an issue with formatting an anchor link using transform scale attributes on hover. The link is inside a div that's aligned to the right, and I want it to enlarge when hovered over. However, this increase in size also affects the parent div, ca ...

Tips on implementing vertical-align within an inline-table

Can someone help me with vertically centering text inside links without losing the 100% height of "a" elements? I've tried to tackle this issue without success, and I am using Twitter Bootstrap 3. Any suggestions would be greatly appreciated. ...

Sliding background in a multi-column accordion

I've hit a roadblock with this project. I'm working on setting up a FAQ section that needs to display its items in two columns on desktop, each with a drop shadow effect using Bootstrap 4. I've experimented with Flexbox and CSS columns with ...

The JavaScript code will automatically execute loops

Let me illustrate my point with two functions. Function 1 This function triggers a transition when you hover over the square. If you move your mouse off the element and then back on while the transition is still in progress, it will wait until the end of ...

Controlling the back DIV while maintaining overlapping layers

I successfully positioned my right hand content on top of the leaflet map in the background using CSS properties like position and z-index. However, I am looking for a way to make the overlapping div not only transparent but also non-interactive while stil ...

Highlighting a Table Column with a Radio Button

I am struggling with controlling the highlight of a table using only radio buttons. When I try to change the selector to input:radio, it doesn't work as expected. It seems to only work with the selector provided in my code snippet. $("th").on("clic ...

When scrolling, use the .scrollTop() function which includes a conditional statement that

As a newcomer to jQuery, I've been making progress but have hit a roadblock with this code: $(window).scroll(function(){ var $header = $('#header'); var $st = $(this).scrollTop(); console.log($st); if ($st < 250) { ...

Struggling with aligning two divs side by side on an HTML page

Recently, I've been experimenting with Electron and attempting to create 2 divs side by side. Despite trying various alignment options found here, nothing seems to be working for me. Here's the code I have so far: Code body, html { hei ...

Center align the division within the list item

Check out the fiddle provided here: https://jsfiddle.net/5jnnutg8/ I am looking for a way to center align and display inline the "something #" list items. While the title "Hi" can be centered using text-align: center in css, this doesn't seem to wor ...