Iconic Navigation: Bootstrap 3 Navbar featuring Carousel

I'm currently in the process of developing a website using bootstrap3. Despite watching numerous tutorial videos, I am still facing challenges.

  1. One of my goals is to have the logo on the navbar aligning with the left side (which I've achieved), and I also want additional icons that will act as links to other sections of the page to be positioned towards the left as well. However, I haven't been able to figure this out using HTML/CSS yet. You can visit www.frobot.net to see the design I'm trying to replicate. Essentially, there are multiple icons displayed next to the text.

  2. Another requirement is to set a white background for the navbar and make sure it has a distinct bottom edge instead of blending into the rest of the website. Currently, there isn't a consistent horizontal white space separating the navigation tools.

  3. I've configured a carousel for three images, but only the first image appears when the carousel loads.

I would greatly appreciate it if someone could help me pinpoint the issues in my code.

HTML:

<!DOCTYPE html>

    <html>
        <head>

             <!-- Website Title & Description for Search Engine purposes -->
            <title>THE BEST YOGURT</title>
             <meta name="description" content="Frozen Yogurt">

        <!-- Mobile viewport optimized -->
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

        <!-- Bootstrap CSS -->
        <link href="css/bootstrap.min.css" rel="stylesheet">
        <link href="css/bootstrap-glyphicons.css" rel="stylesheet">

        <!-- Custom CSS -->
        <link rel="stylesheet" href="css/style.css">

        <!-- Include Modernizr in the head, before any other Javascript -->
        <script src="js/modernizr-2.6.2.min.js"></script>


    </head>

    <body>

        <div class="container" id="main">

            <nav class="navbar navbar-fixed-top" role="navigation">

                <div class="container-fluid">

                    <div class="navbar-header">

                        <a class="navbar-brand" href="#">

                            <img src="img/logo.png" alt="#Logo">

                        </a>

                    </div>

                    <div class="navbar navbar-custom">

                        <div class="navbar-header">

                            <a class="icons" href="icons">

                    <link href='http://fonts.googleapis.com/css?family=Titillium+Web' rel='stylesheet' type='text/css'>

                    <a href="#"><img src="img/froyo.png" alt="Froyo"<li>FROYO</li></a>

                    <a href="#"><img src="img/story.png" alt="Bots"<li>BOTS</li></a>

                    <a href="#"><img src="img/team.png" alt="Press"<li>PRESS</li></a>

                    <a href="#"><img src="img/talk.png" alt="Team"<li>TEAM</li></a>

                    <a href="#"><img src="img/contact.png" alt="Contact"<li>CONTACT</li></a>

                </div>

            </nav><!--End Nav Bar -->

        </div>

        <!-- Carousel Begins -->

        <div class="carousel-slide" id="myCarousel">

            <!-- Indicators -->

            <ol class="carousel-indicators">
                <li class="active" data-slide-to="0" data-target="#myCarousel"></li>
                <li data-slide-to="1" data-target="#myCarousel"></li>
                <li data-slide-to="2" data-target="#myCarousel"></li>
            </ol>

            <!-- Wrapper for slides -->
            <div class="carousel-inner">
                <div class="item active" id="slide1">
                    <div class="carousel-caption">
                        <h4></h4>
                        <p></p>
                    </div><!-- end carousel-caption-->
                </div><!-- end item --> 

                <div class="item" id="slide2">
                    <div class="carousel-caption">
                        <h4></h4>
                        <p></p>
                    </div><!-- end carousel-caption-->
                </div><!-- end item -->

                <div class="item" id="slide3">
                    <div class="carousel-caption">
                        <h4></h4>
                        <p></p>
                    </div><!-- end carousel-caption-->
                </div><!-- end item -->
            </div><!-- carousel-inner -->

            <!-- Controls -->
            <a class="left carousel-control" data-slide="prev" href="#myCarousel"><span class="icon-prev"></span></a>
            <a class="right carousel-control" data-slide="next" href="#myCarousel"><span class="icon-next"></span></a>

        </div><!-- end myCarousel -->

        <div class="row" id="FroYo">

            <a href="#"><img src="img/contact-para-bg.png" alt="Bots"</a>


</body>
</html>

CSS:

/* --------------------------------------
   Layout
   -------------------------------------- */

   .nav-bar {


        position:fixed;

        top:0;

        background-color:white;

        padding-top:30px;

        padding-left:100px;
   }

   .navbar-brand {

    padding: 13px 15px;

    background-color:white;
}


   .icons {

        margin:0;

        padding-top: 25px;

        padding-right: 200px;

        padding-left:100px;

        background-color:white;


    }

    .icons a{

        font-family: 'Titillium Web', sans-serif;

        text-decoration: none;

        float: left;

        display: block;

        padding: 20px 15px;

        color:gray;

        background-color:white;

    }

    .icons a:hover{

        color:purple;
    }





* --------------------------------------
   Carousel
   -------------------------------------- */

#myCarousel {
    margin-top: 300px;
    background-color:gray;
}

.carousel-caption {
    font-size: 24px;
}

.carousel-caption h4 {
    font-size: 32px;

}


#myCarousel .item { height: 700px; }

#slide1 {
    background: url('../img/best-slide.png') top center no-repeat;
}

#slide2 {
    background: url('../img/good.png') top center no-repeat;
}

#slide3 {
    background: url('../img/slide3.png') top center no-repeat;
}

Answer №1

To create separation between your navbar and the rest of the page, try adding a bottom border to the navbar and adjusting the CSS properties of the border. Don't forget to include data-ride="carousel" in the div tag for the carousel as well.

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 preceding sibling function may encounter issues when multiple child tags are present

In this case, the XPath used to locate the checkbox is as follows: //td[text()='bbbb vvvvvvvvv']/preceding-sibling::td/div/input[@class='hidden'] However, despite using this XPath, the input element is not being captured. Only the "//t ...

Do not apply tailwindcss styles to Material-UI

I've been struggling to apply styling from tailwindcss to my MUI button. My setup includes babel and webpack, with the npm run dev script as "webpack --mode development --watch". tailwind.css module.exports = { content: ["./src/**/*.{js, jsx, t ...

Owl carousel issue: Fixed position not functioning properly

To view the page with the issue, click here I am attempting to make the column (div) day/date headers sticky when they scroll out of view so that users can always see what day they are looking at. Instead of directly manipulating the header itself, I have ...

implement css property solely when device is in landscape orientation

I am facing an issue with applying CSS to a mobile device, specifically for horizontal orientation. When the device is in a vertical position, the page appears blank, and different CSS loads for desktop view. Although I have managed to make the desktop CS ...

Jquery Not Responding to HasChanged Function

I am a beginner and looking for some guidance. I am attempting to develop a single page app using Jquery and AJAX, but unfortunately nothing seems to be working; no errors or any other indication. There are three hyperlinks with hrefs: #/main, #/second, # ...

I'm looking for help on creating a three-column table using javascript/jquery. The table should display Product, Price, and Discount (which is calculated at 20%). Can anyone

Check out this code snippet. var items = ["Laptop", "Tablet", "Smartphone", "Headphones", "Camera"]; var costs = [599.99, 299.99, 799.99, 149.99, 499.99]; displayItems = ""; totalCost = 0; for (var j = 0; j < items.length; j++) { displayItems += " ...

Applying the document height to window height ratio to create a scale ranging from 1 to 100

My goal is to create a scroll bar using two divs with heights of 110px and 10px. The smaller one will be nested inside the taller one, allowing for adjustment of its margin-height from 0 to 100px while still fitting within the larger div. When I refer to ...

JavaScript application that features an audio player complete with a dynamic progress bar and customizable tags

Looking to create a custom audio player using HTML, CSS, and JS. The player should have basic functionality like a play button and progress bar. However, I want to allow users to add tags on the progress bar of the audio file, similar to how SoundCloud&apo ...

Creating an HTML table with colspan and rowspan using ng-repeat from a deeply nested JSON dataset

I'm working on creating a table layout shown in the attached image: Composite Class Routine Check out my progress so far in this Plunker demo: https://plnkr.co/edit/4WiWKDIM2bNfnmRjFo91?p=preview The JSON data I'm using is as follows: $scope. ...

What is the best way to specify attributes such as font size and padding for the mobile version in AMP for email?

I attempted to utilize media queries to create a responsive AMP email, but it seems that this feature is not supported in AMP. However, I discovered that you can define media="(max-width: 599px)" and media="(min-width: 600px)" for </amp-img>, but the ...

Difficulty with linking a CSS property to an HTML element using JavaScript

I'm currently working on building a custom carousel from scratch. Instead of using pre-made code snippets, I decided to challenge myself by creating one using setTimeout in JavaScript. However, I seem to be encountering an issue that I can't quit ...

Navigation menu with submenus containing buttons

I attempted to incorporate a dropdown into my existing navigation bar, but unfortunately, the dropdown content disappeared after adding the necessary code. I am now at a loss on how to troubleshoot this issue and make the dropdown function properly. Despit ...

What is the best method to adjust the width of the <option> tag within the <select> tag using CSS?

<!DOCTYPE html> <html> <head> <title>Page Title</title> <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="s ...

I'm having trouble getting this button and icon to align properly. How can I fix this misalignment

Take a look at the HTML code snippet I'm currently working on... <div id="projects"> <H1 class="projects">PROJECTS</H1> <div class="box"></div> <div class="box"></div> <div class="box"></ ...

What is the process for adding a box shadow beneath my header?

I am currently attempting to add a box shadow under my header, similar to the design featured in the project mockup at https://github.com/RaghavMangrola/the-brighton-times. After trying to implement the following CSS property and value: .header { ...

Instructions for transferring files directly from one website to another

Looking at the PHP code snippet provided: <?php $image_cdn = "http://ddragon.leagueoflegends.com/cdn/4.2.6/img/champion/"; $championsJson = "http://ddragon.leagueoflegends.com/cdn/4.2.6/data/en_GB/champion.json"; $ch = curl_init();` $timeout = 0; cur ...

How can one utilize XPath and the R language to selectively extract portions of a text string when the strings are varied and inconsistent?

Can xpath and R (not PHP) be used to extract just the city from a longer address string? Below is the relevant excerpt from a webpage: <table id="offices" cellspacing="8" width="700" height="100" border="0"> <tbody> <tr> <td valign ...

Resetting the width of a CSS-styled div to its default maximum width

I have a set of automatically generated div containers that contain label and data information. For example: <div class="display-label"> @Html.DisplayNameFor(model => model.BusinessPhone) </div> <div class="display-field"> @H ...

Do not ask for confirmation when reloading the page with onbeforeunload

I am setting up an event listener for the onbeforeunload attribute to show a confirmation message when a user attempts to exit the page. The issue is that I do not want this confirmation message to appear when the user tries to refresh the page. Is there ...

How to Build a Number Spinner Using Angular Material?

Is there a number spinner in Angular Material? I attempted to use the code provided in this question's demo: <mat-form-field> <input type="number" class="form-control" matInput name="valu ...