implementation of footers in dynamic web design

I'm encountering an issue while trying to implement the footer for my website.
I have included two <ul> lists within the inner_footer as shown in the code snippet below. However, when I zoom in, the <ul> list inside the div element becomes invisible. It appears to be a float-related problem, but I can't seem to pinpoint the exact cause.

HTML:

<div class="grid_16">
    <div class="footer">
        <div class="inner_footer">
            <ul>
                <li>Some content</li>
            </ul>
        <div>
            <ul>
                <li><a>Link 1</a></li>
                <li><a>Link 2</a></li>
                <li><a>Link 3</a></li>
                <li><a>Link 4</a></li>
                <li><a>Link 5</a></li>
                <li>Copyrights</li> 
            </ul>   
        </div>
    </div>
</div>

CSS:

.footer {
    height:105px;
    position:relative;
    top:0;
    width:100%;
  }
.inner_footer {
    background:url(../images/layout_img/nav.jpg) 0 center repeat-x;
    font-size:12px;
    border-radius:4px;
    position:relative;
    width:inherit;
    height:31px;
    margin:0 auto;
}
.inner_footer ul {
    margin:0;
}
.inner_footer ul li {
    color:#FFF;
    font-family:calibri;
    font-size:13px;
    list-style-type:none;
    line-height:31px;
    text-decoration:none;
    padding:0 10px;
}
.inner_footer ul li a img {
    margin:2px 0 0 20px;
}
.inner_footer ul li a {
    color:#FFF;
    float:left;
    font-family:calibri;
    font-size:13px;
    list-style-type:none;
    line-height:31px;
    text-decoration:none;
    padding:0 10px;
}
.inner_footer div {
    float:right;
}
.inner_footer div ul li a {
    color:#FFF;
    float:left;
    font-family:calibri;
    font-size:13px;
    list-style-type:none;
    line-height:31px;
    text-decoration:none;
    padding:0 10px;
}
.inner_footer div ul li {
    color:#FFF;
    float:left;
    font-family:calibri;
    font-size:13px;
    list-style-type:none;
    line-height:31px;
    text-decoration:none;
    padding:0 10px;
}

Answer №1

It appears that the issue lies within your HTML code. You may have forgotten to properly close a div element. The corrected code should look like this:

<div class="grid_16">
    <div class="footer">
        <div class="inner_footer">
            <ul>
                <li>Some content</li>
            </ul>
        </div>
        <div>
            <ul>
                <li><a>Link 1</a></li>
                <li><a>Link 2</a></li>
                <li><a>Link 3</a></li>
                <li><a>Link 4</a></li>
                <li><a>Link 5</a></li>
                <li>Copyrights</li> 
            </ul>   
        </div>
    </div>
</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

Ways to define css attributes for the "before" and "after" pseudo elements in the DOM

I'm looking to modify the color of the "border-left" property from its default red to a different color within the scope, such as blue. .hello:before { content:' '; display:inline-block; width: 22px; height: 25px; ...

Fetching data from local JSON file is being initiated twice

I need some help understanding why my code is downloading two copies of a locally generated JSON file. Here is the code snippet in question: function downloadJson(data, name) { let dataStr = 'data:text/json;charset=utf-8,' + encodeURICompo ...

display directories and subdirectories within a side panel

I have a main folder named 'server'. Inside this folder, there are two subfolders called 'computer1' and 'computer2'. Further inside 'computer1' and 'computer2', there are more folders. Currently, I have a ...

AngularJS: Optimizing load times by consolidating all partial views/templates for production

My goal is to maintain views in a highly modular way. This entails using numerous small, generalized HTML snippets that come together to form the actual HTML page. While ng-include and custom directives with templateUrl work well for me during development, ...

Having trouble with CSS Transition functionality not functioning properly

I have set up a temporary page with a two-word message in the h1 tag. The h1 has a CSS3 infinite transition for shadow animation. The shadow is visible on all sides, but it does not transition smoothly. The shadow changes abruptly at regular intervals. I ...

Adjusting the gaps between each item in a list

Currently, I am working on developing a minimalist single-page website. However, I am facing challenges with spacing in the navbar section (as demonstrated below). When using an unordered list, everything looks good until the list overlaps with the centra ...

CSS: Preserve HTML elements and only conceal the text within an <a> tag

Inside an "a" element, there's an image followed by text as a link. I'm looking to only hide the text of the link without affecting the display of the image. <a href="https://www.example.com/page"> <img src=" ...

I'm not entirely sure why I keep getting the error message stating "Cannot read property 'innerHTML' of null"

Having an issue with my JavaScript code where I am trying to insert a new table row into the HTML but keep getting an error message that says "Uncaught TypeError: Cannot read property 'innerHTML' of null" <!DOCTYPE html> <html lang=" ...

How to get rid of the outline border in MUI React when an element

I've been experimenting with placing 2 MUI inputs under the same label to create a custom field. I managed to find a solution by grouping the fields in another TextField container, but this seems to be affecting the borders in a way that I don't ...

Tips for adjusting the hue of a single color in a JPEG image

Is there a way to transform white color to red using only CSS, while leaving the rest of the colors unaffected? This should be accomplished without changing any other elements. ...

Invoking functions within a jQuery extension

I've come up with this code to define the instance of my plugin: $.fn.someplugin = function(opts) { $(document).on('click', '.option-1', function() { alert(1); }); }; To make my plugin work, I utilize code similar to this ...

Utilizing .html() to convert JSON data into HTML content

I have thoroughly commented the code below in my attempt to retrieve JSON data and pass it to the 'results' div in my HTML view. However, this process seems to return nothing, making it challenging to debug since no output can be displayed on the ...

Display picture next to content with the help of CSS/Bootstrap and Django's Jinja 2

I'm having trouble displaying an image next to text, it keeps showing up below. Here's the code snippet: <div class="container"> <div class="row"> <div class="col-md-8"> < ...

Scroll elements to the left and display the element on the far right

I need help with setting the CSS for an unordered list inside a container. I want the last list item to show and the leftmost item to be hidden when there is not enough space in the container. Order: li1 > li2 After adding li4, the order should be: ...

Toggle a DIV's class using jQuery upon clicking a link, then hide the link and reveal the hidden information inside the DIV. This functionality can be applied to multiple

My main objective is to create a product page that showcases multiple product images within the productLayout DIV. When the link within this DIV is clicked, it should add the class pL100, expanding the width of the DIV to reveal hidden content within the h ...

Implementing a click function that toggles between adding and removing a class, keeping track of the number of clicks, and utilizing localStorage to prevent repeated clicking in the

Hi there! I'm currently working on a simple widget that features a clickable icon and a counter next to it. When the icon is clicked, it should toggle between an empty heart and a filled heart using addClass/removeClass. Additionally, each click incr ...

Toggle classes on button click

<div class='fixed_button homes hidden'> <a class='btn btn-primary homes'>Continue &rarr;</a> </div> Using jQuery Library $(".homes").on('click', function(){ $("choose_style").addClass(&apo ...

What is the method for customizing the scroll highlight color within bookdown by modifying the style.css file?

One interesting aspect of Bookdown is its built-in feature that automatically highlights in blue the section in the sidebar that you are currently scrolling past or reading. However, I'm having trouble changing the color in the style.css page. Using a ...

Positioning an immovable element beneath a fixed element that can vary in height

I am working on a webpage that features a fixed menu at the top-left corner, followed by the main content. My goal is to ensure that the content appears below the menu, but since I do not know the exact height of the menu in advance (as it can vary based o ...

Effortlessly switch between multiple divs with jQuery

I am working on a functionality where multiple divs should be displayed or hidden based on the button clicked. Initially, all buttons and divs are visible. Upon clicking a button, only the corresponding div should be visible. Subsequent clicks on other but ...