The logo is centrally located in the header, while the CSS is floating to the right on the landing pages

CSS

align: right

The logo on the delicious wines website appears on the left side even though the CSS code specifies it should be aligned to the right. I'm stumped and could use some assistance. Thank you!

Answer №1

<div id="header-logo" class="col-xs-6 col-sm-6 col-sm-offset-6">
  <a href="/">
    <img src="/images/au/en/brands/wp/recr/WP_logo.gif" alt="Laithwaite's Wine" class="img-responsive pull-right">
  </a>
</div>

For achieving your desired layout, combining .pull-right and .col-sm-offset-6 classes is effective in most cases. There are also other options available for customization.

If you need more guidance, it would be beneficial to refer to the Bootstrap 4 grid layout documentation here: https://getbootstrap.com/docs/4.1/layout/grid/

Answer #2:

Regarding:

The webpage uses Grid CSS inspired by Bootstrap but lacks appropriate media queries to adjust class behavior based on screen size. This leads to conflict between .col-xs-5 and .col-sm-6. To resolve this issue, consider removing the .col-xs-5 class until the CSS library can be compiled accurately.

HTML

<div class="header-container clearfix">
    <!-- Begin logo -->
    <div id="header-logo" class="col-xs-5 col-sm-6">
                    <a href="/">
                    <img src="/images/au/en/brands/wp/recr/my241_logo.jpg" alt="My241" class="img-responsive">
                    </a>
            </div>
 <!-- End logo -->
 <div class="col-xs-2 visible-xs">&nbsp;</div>
 <!-- Begin logo -->
    <div id="header-logo" class="col-xs-5 col-sm-6">
                    <a href="/">
                    <img src="/images/au/en/brands/wp/recr/WP_logo.gif" alt="Laithwaite's Wine" class="img-responsive" style="float:right">
                    </a>
            </div>
    <!-- End logo -->
</div>

To resolve, adjust as follows:

<div class="header-container clearfix">
    <!-- Begin logo -->
    <div id="header-logo" class="col-sm-6">
                    <a href="/">
                    <img src="/images/au/en/brands/wp/recr/my241_logo.jpg" alt="My241" class="img-responsive">
                    </a>
            </div>
 <!-- End logo -->
 <div class="col-xs-2 visible-xs">&nbsp;</div>
 <!-- Begin logo -->
    <div id="header-logo" class="col-sm-6">
                    <a href="/">
                    <img src="/images/au/en/brands/wp/recr/WP_logo.gif" alt="Laithwaite's Wine" class="img-responsive" style="float:right">
                    </a>
            </div>
    <!-- End logo -->
</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

<td> issue with IE not rendering overflow:hidden properly

In an effort to display text in a TD, I've implemented the overflow property set to hidden for the td element. Surprisingly, this code works flawlessly in Chrome, Safari, and Mozilla browsers, but unfortunately falls short in IE. Despite attempting to ...

What exceeds the size of the HTML tag?

I noticed that the height of my section with id "the-view-port" is set to 100vh in my page like this: <html> <body> <section id="the-view-port"> However, I am experiencing an issue in Chrome (Version 73.0.3683.86) where there seem ...

Separate choices with delineating lines, conceal when picked

input { position: absolute; left: -9999px; } input + label { border-right: solid 1px #000; padding-right: 8px; margin-right: 8px; } input:checked + label { display: none; } <input type="radio" id="one" name="option" checked/> <label ...

show SQL variables in a text box using PHP

So I've been working on a project that involves displaying the forename of a customer from my database in a text box. The idea is to allow users to edit customer information stored in an SQL database. However, I'm facing issues as the text box ap ...

Increased dropdown extending over current items or text

Whenever I expand my dropdown, the items and existing controls seem to be getting mixed up. I am looking to completely hide background items and have the dropdown nested within another set of divs. Here is the code snippet: dropdown.component.css .par ...

Acquiring the index of a selector event within a list of dynamic elements

I am seeking guidance on how to go about solving the issue of obtaining an event index. I have a hunch that closures might play a role in the solution and would appreciate some insights. Initially, I dynamically build an HTML5 video container using an aja ...

Unable to retrieve dropdown value using JavaScript and display it in a div

javaScript code: Retrieving data from a dropdown and displaying it in the inner HTML of a div. function showcost() { var days = document.getElementById("Ddays"); var Dudays = days.options[days.selectedIndex].text; var div = docu ...

Ways to refresh a component on a webpage without having to refresh the entire page

I am looking to dynamically load a specific component on my webpage when another component is altered <input ..... onchange="callFunctionToReloadNextTag()"> <input ... /> <--This is the tag I want to reload Is it possible to reload th ...

A duo creating art on a shared canvas

I have encountered an issue while developing a real-time paint app using HTML5 canvas. Everything works fine when a single user is drawing on the canvas, but problems arise when two users try to draw simultaneously. For example, if one user changes the col ...

Using a button click, how can one determine the values of multiple range sliders and then perform actions depending on these values?

I currently have a set of three Jquery UI sliders. When the user clicks on the next button, I need to retrieve the value of each individual slider and evaluate them in an if-else statement. For instance, if the first slider's value is below 10, it sho ...

Creating a dynamic slideshow with automated arrow navigation is simpler than you may think

I have successfully tested the slideshow and it is functioning perfectly without any issues. I would like to have a dual slideshow setup (slideshow 1 and slideshow 2) with next and previous buttons, but I am interested in adding an automatic sliding featur ...

What is the reason that a Button's text does not adhere to CSS style rules within the container that holds the button?

Imagine having this ASP.NET/CSS snippet: <div style="color:Red;"> some text...<asp:Button runat="server" ID = "Button1" Text = "ABC" /> </div> The "some text" section is displayed in red, however, the button's text remains bla ...

Double the excitement with jQuery UI's bouncing images

Hi everyone, this is my first time posting here so I apologize in advance if there are any issues with my markup. I'm still getting used to the SOF framework for writing posts. Currently, I am working on trying to make social icons bounce on hover on ...

The background image on mobile devices is excessively zoomed in

My RWD page is experiencing a strange issue with the background image. The image has the following styles: #background-image { width: 100%; height: 100%; opacity: 0.5; position: absolute; z-index: -1; background-image: url('../landing.jpe ...

Ways to determine if a table row is expanded or not

Currently, I'm tackling an angular bootstrap table project that involves extendable rows. I'm trying to figure out a way to determine whether the row has been extended or not. Any suggestions on how this can be achieved? Here's the snippet ...

Struggling with creating a static table header in HTML, dealing with problems related to scrolling and visibility?

I am currently attempting to create an HTML table with a fixed header and a horizontal scrollbar that appears when necessary. Utilize the provided JSFiddle link for reference: html, body { margin:0; padding:0; height:100%; } .horizontalscroll ...

Generate dynamic star rating radio buttons using AJAX and automatically populate them based on the selected value

I'm pulling reviews from my database and dynamically creating carousel items with star radio buttons. I want to automatically check the stars based on the votes retrieved from the database. For example: 5 Stars from review 1 3 Stars from review 2 So ...

Issue with Rails application using Bootstrap 5 vertical tabs - tab panel not populating after clicking beyond the first element

Hello, I am a beginner in the world of Ruby on Rails and I am encountering an issue with populating my tab panel with information from the database. While the tabs are displayed correctly, clicking on them only shows the information from the first tab (u ...

Tips on retaining input in fields after form submission for future modifications

Is it feasible to retain user input within a form field after the form has been submitted, enabling the user to modify the entry? I have an HTML registration form [with some JS validation], followed by a PHP file to insert data into SQL and simultaneously ...

Automated Star/Stop feature with a convenient Save button (the Start/Stop format will display as mm/dd/yyyy hh:mm:ss)

I'm having an issue with the date format in my code. Currently, it displays as Mon Mar 13 2017 19:02:50 GMT-0400 (Eastern Daylight Time), but I need it to be in the format mm/dd/yyyy 00:00:00 am/pm. My challenge is to capture the current date and tim ...