• <" />
    • <" />
      • <"/>
        DEVHIDE
        • Home (current)
        • About
        • Contact
        • Cookie
        • Home (current)
        • About
        • Contact
        • Cookie
        • Disclaimer
        • Privacy
        • TOS
        Login Or Sign up

        why there is left padding and margin top for ul(flex) in header (flex)

        18 Views Asked by True Champion At 18 September 2023 at 00:40 2025-11-16T01:44:46.725000

        i want to give a vertical navbar , and contents should be on left

        ////   ITS HTML //// 
        enter image description here<section class="header2">
                    <ul>
                        <li> <a> Home </a> </li>
                        <li> <a> Explore </a> </li>
                        <li> <a> About </a> </li>
                        <li> <a> Contact</a> </li>
                    </ul>
                </section>
        
        
        
        ///// ITS CSS ////
        .header2
        {
            display: flex;
            margin: 0;padding: 0;
        }
        .header2 ul
        {
            display: flex;
            flex-direction: column;
            row-gap: 20px;
            background-color: grey; 
            height: 100%; 
            width: fit-content;
            align-items: flex-start;
            align-content: flex-start;
            justify-content: flex-start;
        }
        

        i want to give no left padding for ul and no margin top for ul , simple its content should be on left side

        css header navbar html-lists boxlayout
        Original Q&A
        0

        There are 0 best solutions below

        Related Questions in CSS

        • How to use custom font during html to pdf conversion?
        • Storing the preferred font-size in localStorage
        • mp4 embedded videos within github pages website not loading
        • Is there any way to glow this bulb image like a real light bulb
        • What can I do to improve my coding on both html and css
        • Uncaught TypeError: google.maps.LatLng is not a constructor at init (script.js:7:13)
        • Bootstrap modal not showing at the desired position on a web page when the screen size is smaller
        • How to increase quality of mathjax output?
        • Hover animation resetting( seemingly reverting back to original CSS and then again to hover)when moving mouse horizontaly accross a part of an element
        • Storing selected language in localStorage
        • How to clip grid cell and provide scroll as well?
        • KeyboardAvoidingView makes a messy the flexbox
        • Rotate an object around another object in javascript
        • Understanding Scroll Anchoring Behavoir
        • how to use only block layout in this css code?

        Related Questions in HEADER

        • How can I read the header of request to webserver
        • #include Header files in C with definition too
        • I have a horizontal line drawn in the header of the last page of the list of tables in my document, how can I remove it?
        • Invoke Rest API with a custom header
        • A subtle line appears within our homepage banner, situated near the header section
        • browsers don't display authorization header in devtools
        • Using if directives in headers
        • Why is my head not working on my website? It only shows the alt text
        • Menu and logo disappeared from the header in WordPress
        • How do I log into a site with curl or javascript?
        • What CSP Headers are needed for serving .NET Core site to iframe in Shopify Page?
        • Background video of header doesnt display on iPhones
        • Multi-Level Header in Pandas DataFrame
        • My header has disappeared/lost its formatting; Its suddenly not applying some of the custom css
        • Why Rstudio compiler looking for R headers in the wrong include directories?

        Related Questions in NAVBAR

        • Dropdown menu in a fixed navbar
        • How to write HTML CSS code for a header navbar that too responsive
        • navbar not appear in the result?
        • Bootstrap cards
        • Bootstrap 5.3 burger menu not responsive in Underscore WordPress template
        • microsoft from 2.0 controler textbox to retrieve the hindi content in vba
        • How do I make navigation bar buttons show and hide divs/sections on click without javascript or JQuery?
        • i want codepen to angular component for this template
        • Trying to create a responsive nav bar for smaller device, but after clicking the button everything disappears
        • Wordpress navbar and slider
        • Change highlight colour on scroll in React js
        • Image not displaying under Nav bar
        • CSS Styling is applied to the submenu border on live website but why it is not working
        • Blazor Navigation Menu - add picture and a Text Line
        • Weird behaviour of Google Chrome's responsive website checker

        Related Questions in HTML-LISTS

        • How to access invisible Unordered List element with Selenium WebDriver using Java
        • Making summary details element auto collapsible
        • How to hide first li in ul?
        • Pandoc - HTML to Markdown not processing nested unordered lists correctly
        • jquery ui drop event did not fire for last li item between 2 lists
        • li and a element styling issue with Chrome after clicking a link
        • Styling an ordered list, and putting the numbers inside the list item
        • Select one (this) item from <li> (jQuery/javascript)
        • How to use class on primary menu ul instead of div in wordpress
        • Listing keys/urls returned from S3 buckets (HTML5/PHP)
        • How do I make my background-color fill entire width of div when applied to a `ul li`?
        • How to replace href inside of <li> using jQuery
        • Render multilevel nested list with indentation on names but without translating left border too
        • Calling li's in css
        • JQuery to change background color of selected list item

        Related Questions in BOXLAYOUT

        • Why is my JButton size not changing with either setSize() or setPreferredSize()?
        • Java swing glue component (Filler) adds a useless 1 pixel space at the end of the panel
        • kivymd buttons remain on the left of the screen
        • why there is left padding and margin top for ul(flex) in header (flex)
        • Swing Layout with CardLayout
        • How to make a spoiler in Swing (and why a simple solution is not working)
        • My kivy app crushes when label or text input has letter 'w' in the text field
        • Set size of JTextField with BoyLayout Manager. Java
        • Resizeable JButton in BoxLayout
        • JButtons are not appearing at the West side of the application
        • Bad:freezing app while using loop in kivy
        • Jetpack compose Box layout clip showing white background
        • Java Swing Glue not working between 2 buttons
        • My .exe file is not running while my .py file is running fine
        • How to set width of specific panel with BoxLayout Manager

        Trending Questions

        • UIImageView Frame Doesn't Reflect Constraints
        • Is it possible to use adb commands to click on a view by finding its ID?
        • How to create a new web character symbol recognizable by html/javascript?
        • Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
        • Heap Gives Page Fault
        • Connect ffmpeg to Visual Studio 2008
        • Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
        • How to avoid default initialization of objects in std::vector?
        • second argument of the command line arguments in a format other than char** argv or char* argv[]
        • How to improve efficiency of algorithm which generates next lexicographic permutation?
        • Navigating to the another actvity app getting crash in android
        • How to read the particular message format in android and store in sqlite database?
        • Resetting inventory status after order is cancelled
        • Efficiently compute powers of X in SSE/AVX
        • Insert into an external database using ajax and php : POST 500 (Internal Server Error)

        Popular # Hahtags

        javascript python java c# php android html jquery c++ css ios sql mysql r reactjs

        Popular Questions

        • How do I undo the most recent local commits in Git?
        • How can I remove a specific item from an array in JavaScript?
        • How do I delete a Git branch locally and remotely?
        • Find all files containing a specific text (string) on Linux?
        • How do I revert a Git repository to a previous commit?
        • How do I create an HTML button that acts like a link?
        • How do I check out a remote Git branch?
        • How do I force "git pull" to overwrite local files?
        • How do I list all files of a directory?
        • How to check whether a string contains a substring in JavaScript?
        • How do I redirect to another webpage?
        • How can I iterate over rows in a Pandas DataFrame?
        • How do I convert a String to an int in Java?
        • Does Python have a string 'contains' substring method?
        • How do I check if a string contains a specific word?
        .

        Copyright © 2021 Jogjafile Inc.

        • Disclaimer
        • Privacy
        • TOS
        • Homegardensmart
        • Math
        • Aftereffectstemplates