adjusting the length of the right boundary

I am looking to customize the size of the right border on each tab within my menu, or have the borders extend the entire vertical length of the menu.

View my current code snippet here: http://jsfiddle.net/5FP8R/

<div id="menu">
    <ul>
        <li><a class="lien_menu">
                <br>Onglet0 loooooooog</a></li>
        <li><a class="lien_menu">
                <br>Onglet1</a></li>
    </ul>
</div>

Your assistance is greatly appreciated.

Answer №1

To make things easy, simply specify the height of your

#navigation ul 

and

#navigation ul li

as 100%. By setting a fixed height for #navigation, the li items will automatically adjust to that height to fit perfectly. You might need to modify the height of #navigation if there is too much space in between now.

Answer №2

 #menu ul li {
     display: table-cell;
     padding: 0px 12px 0px 12px;
     border-right: 1px solid #278fac;
     text-shadow: 0 1px 1px #278FAC;
     height: inherit;
     text-align: center;
     max-width: 100px;
 }

The implementation of display: table-cell; in this context is quite effective :)

Answer №3

To alter the layout of #menu ul li, consider implementing a height attribute (e.g., height: 60px;)

#menu ul li {
  display: inline-block;
  padding: 0px 12px 0px 12px;
  border-right: 1px solid #278fac;
  text-shadow: 0 1px 1px #278FAC;
  text-align: center;
  max-width: 100px;
  height: 60px;
}

Answer №4

Experience the capabilities of CSS3 with: display: flex

Check out this JSFiddle example

#menu {
  width: 100%;
  background: -moz-linear-gradient(top, #C20017, #C20017); 
  margin-bottom: 10px;
  border: 0px solid red;
}

#menu ul {
  padding: 7px 10px 5px 10px;
  margin: 0px;
  border: 0px solid green;
  display: flex; /* transforming into flex-container */
  height: 70px; /* adjust height as needed */ 
  flex-flow: row nowrap;
  align-items: stretch; /* stretching items' height to container */
  justify-content: center; /* horizontally aligning to center */
}

#menu ul li {
  padding: 0px 12px 0px 12px;
  border-right: 1px solid #278fac;
  text-shadow: 0 1px 1px #278FAC;
  text-align: center;
  max-width: 100px;
  list-style: none; /* removing list style */
}

a.lien_menu {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

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 best way to create a fully clickable navbar item for the Bootstrap dropdown feature?

I'm struggling to make a button in a navbar fully clickable for the dropdown to open. Even when I try adding margin instead of padding, it only makes things worse. Can someone help me figure out what mistake I'm making here? Essentially, my goal ...

Obtaining localStream for muting microphone during SIP.js call reception

My approach to muting the microphone involves using a mediastream obtained through the sessionDescriptionHandler's userMedia event. session.sessionDescriptionHandler.on('userMedia', onUserMediaObtained.bind(this)) function onUserMediaObta ...

How can I transfer data from a text box to a combo box?

I am currently engaged in developing a web application that utilizes HTML, CSS, and PHP. However, I am interested in learning how to pass the value from a text box to a combo box. Below is the section of HTML code related to this query. Additionally, it ...

Error in viewpoint/transformation transition on Microsoft Edge

Encountering a peculiar issue with MS Edge involving the animation of a door (a div tag) around the Y axis using the css rotateY() function in combination with perspective properties. The problem arises when transitioning an angle from a positive value to ...

Ways to center an image within a div using Bootstrap 4

I am currently using Bootstrap version v4.0.0-beta.3 and facing a challenge with aligning an image in the absolute center of a fixed-height div tag. While I have successfully aligned the image horizontally using the mx-auto and d-block classes, I am strugg ...

Web Development: Custom Search Form

I am looking to create a website with a form similar to this one, but I'm struggling to figure out how to incorporate all three components into a single form using only HTML and CSS - no javascript. Do you have any suggestions or advice on how to achi ...

How can I extract text from nested HTML elements with a <a href> tag using the Jericho library?

Here is a snippet of my HTML code: <div class="itm hasOverlay lastrow"> <a id="3:LE343SPABGLIANID" class="itm-link itm-drk trackingOnClick" title="League Sepatu Casual Geof S/L LO - Hitam/Biru" href="league-sepatu-casual-geof-sl-lo-hitambiru-6816 ...

Warning: HTML input values are being cleared when added

I've been working on some code that adds an input field when a button is clicked. When the limit reaches 5 (counter), it displays a bootstrap warning. The issue I'm facing is that after hitting "add field" more than 5 times, the values in the fie ...

The div inside another div does not appear centered on Safari

Even though I've managed to center a div within another div, it seems to not be functioning properly in the Safari browser. #box{ width: 100%; height: 100%; position: relative; } ...

Unable to locate element by index using XPath

When using XPath in the Console to locate an icon element like $x("//mat-icon"), a list of elements is retrieved: 0: <mat-icon class="mat-icon notranslate mat…-color ng-star-inserted" _ngcontent-cvb-c17="" aria-hidden="false" aria-label="start" role= ...

Adding a row from two drop-down lists to a table and deleting it upon selection

Looking to dynamically update a table based on dropdown selection in jQuery. When a value is selected from the first dropdown list (projects), followed by a selection from the second dropdown list (employee), the selected values should be added as a new ro ...

Encountering the error "unrecognized pseudo-class :lang" following the Angular update

Recently, I updated my node version and encountered a new error: custom-file-input:lang(en)~.custom-file-label -> unmatched pseudo-class :lang I'm not sure what's causing this issue. Can someone help me troubleshoot this error? My current n ...

Click the link to copy it and then paste the hyperlink

I am facing an issue with copying and pasting file names as hyperlinks. I have checkboxes next to multiple files and a share button. When I check the boxes and click on the share button, I want to copy the download URLs for those files. Although I can succ ...

The specified selector is invalid or illegal in HTMLUnit

Attempting to mimic a login using htmlunit has presented me with an issue despite following examples. The console messages I have gathered are as follows: runtimeError: message=[An invalid or illegal selector was specified (selector: '*,:x' erro ...

Using conditional logic to render components in VueJS

How can I conditionally display content in a parent component based on a user input variable? If the userinput variable is false, I want to remove the <div class="parent"> and show the PopUp component instead. I've tried using `v-if` ...

Remember to follow the camel case convention when utilizing element.tagName(String) with jSoup

Looking to change the name of an HTML tag using Jsoup in the following way - element.tagName("p:panelGroup"); But when I run this code, the output changes the case and I end up with p:panelgroup. Is there a method to preserve the camel case in the resul ...

What could be causing some Fontawesome icons to not display properly?

My index.html is set up correctly with my kit, but I'm having some issues. <script src="https://kit.fontawesome.com/a*******5.js" crossorigin="anonymous"></script> While some icons are showing up just fine, others are ...

Adjust the size of CSS elements on hover while removing any margin

I am currently working on making my navigation bar elements larger when hovered over. However, I'm facing an issue where the rest of the website shifts downward slightly when I mouseover them, and it doesn't look good. Is there a way to increase ...

Blurring images with a combination of jQuery Backstretch and Blurjs

I have a background image displayed using Backstretch and want to apply Blur.js to blur elements on top of it. However, when I try to use Blur.js on the backstretched image, it doesn't work. I believe this is happening because Blur.js uses the CSS pro ...

Increase the vertical distance between rows in a table

Having some issues with customizing a data grid that I developed. Is there a way to eliminate the header bottom border and insert spacing between each row in the table? View Demo Example Code: <dx-data-grid style="margin-top:50px" class="table" [dat ...