Border complications in the navigation dropdown menu

I am looking to add borders around the dropdown part of my menu and remove the blue border showing on the right side. The image linked below illustrates the issue I am facing:

Here is the code for my navigation menu:

<div style="text-align: left;">

<style>
#homelink {
background-image: url(http://i946.photobucket.com/albums/ad301/campbellmichelle41109/sims3_logo_ver931034_zpsmnyi2tcj.png);
background-repeat:  no-repeat;
background-color: transparent;
display: block;
width: 126px;
height: 140px;
}

#homelink {
position: relative;
padding: 0;
margin: -97px;
}
...

Answer №1

If you want to remove the little blue triangle, simply delete the following rule:

#mbt-menu ul li:first-child > a:after {
    content: '';
    position: absolute;
    left: 40px;
    top: -6px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #469ee8;
}

To eliminate the background box around the drop-down menu, add these rules instead:

#mbt-menu ul {
    border: none !important;
    padding: 0 !important;
}

If you wish to get rid of the blue border (which is actually a box shadow) on the right side of the box, you can go ahead and remove these rules:

#mbt-menu li {
    float: left;
    border-right: 1px solid #328ad4;
    -moz-box-shadow: 1px 0 0 #469ee8; /* DELETE */
    -webkit-box-shadow: 1px 0 0 #469ee8; /* DELETE */
    box-shadow: 1px 0 0 #469ee8; /* DELETE */
    position: relative;

For adjusting the positioning of the drop-down menu to align properly with the parent link, modify the left and top properties in this section:

#mbt-menu ul {
    margin: 20px 0 0 0;
    _margin: 0;
    opaciaty: 0;
    visibility: hidden;
    position: absolute;
    top: 46px; /* ADJUST DROP DOWN */
    left: 0;  /* ADJUST DROP DOWN */
    z-index: 9999;
    background: #ffffff;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    border-radius: 3px;
    -webkit-transition: all .2s ease-in-out;
    -moz-transition: all .2s ease-in-out;
    -ms-transition: all .2s ease-in-out;
    -o-transition: all .2s ease-in-out;
    transition: all .2s ease-in-out;
}

Answer №2

Here is an example of what you might be looking for:

#mbt-menu ul {border:none; padding: 0;}

#mbt-menu li li {box-shadow: none; border-width: 2px 2px 0 2px;}

#mbt-menu li li:last-child {border-bottom-width: 2px;}

It's important to note that these styles are just for demonstration purposes and may need to be adjusted to fit into your existing code more appropriately. Consider making the styles more specific in order to override any conflicting styles already present. Test these changes in a controlled setting before implementing them permanently.

If there are style rules affecting both parent and child elements, consider using the child selector (>) to target only the top-level elements.

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

What is the process of modifying a list using a custom tag in JSP?

I encountered an issue with a custom tag in JSP. When the page finishes loading, the HTML content list generated by the div custom tag appears. I then aim to replace this list with new data using AJAX. First, I clear out the old list and create an HTML str ...

Following the recent update to IntelliJ IDEA 2022.1.3, the use of ::ng-deep has been marked

After updating the version of IntelliJ, I noticed that the ::ng-deep angular material selector is now marked as deprecated. Here's an example: <mat-form-field class="register-custom-select"> <mat-select formControlName="gende ...

Get rid of the Bootstrap 4 button outline Mixin

I'm feeling a bit stuck on how to tackle this challenge. My goal is to create a sass mixin that eliminates the default blue Bootstrap outline present on buttons. This way, I can easily apply it to specific buttons as needed. If anyone could offer so ...

I need a way to ensure that the content I input into a form field stays saved even after I reload the page. It's

Within the fields for Firstname, Lastname, and Country, there is a unique feature on the Country field - an add button that allows users to input a country name to be stored in the database. After a user adds a country, the other fields become blank and ...

Adjusting input height with CSS in Google Chrome

When I define an input element with the following CSS properties: input { border: none; font-family: arial, sans-serif; font-size: 16px; line-height: 16px; padding: 0; } I anticipate the height of the input to be 16px, however, upon inspecting ...

Tips on reducing the size of a display:block

Beginner in programming. I'm having trouble with my signature design. The block in the background is sticking out on both sides. How can I adjust its size? <td> <a href="https://twitter.com/TEST" color="#252e42" class="sc-hzDkRC kpsoy ...

Sloped Divider on the Upper Edge of the Page

I'm currently in the process of developing a new website, and I'm looking to create a unique design for the main navigation bar on the homepage. Here is the ideal layout that I have in mind: https://i.stack.imgur.com/pc8z4.png While I understan ...

Presenting CSV data in a tabular format using Angular and TypeScript

I am facing an issue with uploading a CSV file. Even though the table adjusts to the size of the dataset, it appears as if the CSV file is empty. Could this be due to an error in my code or something specific about the CSV file itself? I'm still learn ...

Align numbers vertically inside scrollbar center

I have created a program where you can input a number, and it will count from 0 to the specified number. Currently, the numbers are aligned horizontally up to 12 before starting on a new line. However, I would like the numbers to be arranged vertically fr ...

Troubleshooting problem with CSS alignment within Bootstrap framework

Having trouble with the alignment when using bootstrap CSS. My desired layout is as follows: Place name: dropdownbox Gender (radio-button)Male (radio-button)Female Amount Max: textbox Min: textbox Any advice on how to achieve this? ...

The functionality of jQuery's toggleClass is not functioning properly when clicking on a different thumbnail

My objective: I want to display a set of thumbnails. When a thumbnail is clicked, I want to toggle the hiddenElement class and show a large image inside a hidden div. If anywhere in the DOM is clicked, it should hide the current image or allow the user t ...

Twitter Bootstrap 3 - Change column order for extra small screens

My Twitter Bootstrap layout consists of two columns structured like this: <div class="col-md-4 col-sm-6 col-xs-12"> <div class="post"> Content here </div> </div> <div class="col-md-8 col-sm-6 col-xs-12"> <di ...

Center elements with CSS

When my window is at full width, my items are displayed like this: https://i.sstatic.net/sjtxC.png However, when I resize the window, the Submit button moves up. https://i.sstatic.net/zfH73.png I am looking for a way to keep it evenly centered. Can someo ...

Does "br" not play well with flexbox?

After creating a table using flexbox, I made an interesting observation: the br element seems to have no effect within the flexbox. For example: .flexbox { display: flex; flex-wrap: wrap; border: 2px solid red; padding: 2px; } .item { width: ...

Error Loading Message Appears with jQuery Mobile 1.3.1 and Flot Integration

I am trying to implement a flot interactive example with jQuery Mobile 1.3.1 in my project. However, I am encountering an issue with the latest version of jQuery Mobile where there is a strange frame around the chart and a "loading" text at the bottom of t ...

Tips for utilizing flexbox to position a button to the right of an InputSelect

Struggling to position a button next to a dropdown? No matter what I attempt, the button keeps ending up above the dropdown. Ideally, I'd like it to appear alongside 'Select Organisation' as shown in the image below: https://i.sstatic.net/w ...

Unable to resolve issue with Display:flex in my CSS, despite numerous attempts

Here is the structure of my CSS and HTML: #TopBar{ display: flex; justify-content: space-between; z-index: 1; position: fixed; top: 0px; left: 0px; background-color: rgb(25,25,25); height:115px; width: 2000px; } #Logo{ top: 0px; height: 110px ...

"Embedding a Highcharts web chart within a pop-up modal window

I am looking to incorporate a Highcharts web chart onto a specific part of a Bootstrap modal, while ensuring the size remains dynamic along with the modal itself. Here's what I have attempted so far: Sample HTML code: <td><a href="#">${ ...

Wrapping header text in Vuetify's v-data-table

Struggling with wrapping the header text on a v-data-table component. I've tried applying styles, but only tbody elements are affected. The header (thead element) remains unchanged. Any suggestions on how to get custom styling for the header? For ins ...

Having difficulty showing images from the static folder in Django

https://i.sstatic.net/rpHZg.pngThis page is my home.html Unfortunately, I am facing an issue with displaying the images located in the static/images/ directory. Even though *[09/Mar/2020 15:52:09] "GET /static/images/mona.jpg HTTP/1.1" 404 1669 ...