Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • S shopping-mall
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • students
  • shopping-mall
  • Issues
  • #5

Closed
Open
Created Dec 29, 2020 by Kim, Subin@ksbin1025Developer

MainNav CSS

<Nav className="justify-content-end"> 를 적용했는데 MainNav의 link들이 오른쪽 끝으로 가질 않아요..ㅜㅜ

import React, { useState, useEffect, useRef } from 'react';
import { Navbar, Nav } from 'react-bootstrap';
import logo from '../footprint.svg';
import cart from '../cart.svg';
import option from '../option.svg';

function MainNav() {
    function handleClick() {
        alert('로그아웃이 완료되었습니다.')
    }

    return (
        <Navbar fixed="top" style={{ position: "sticky", background: "#CDC5C2" }}>
            {/* <style type="text/css">
                {`
                .text-light:hover, .text-light:active {
                    color: #f8f9fa;
                }

                .nav-link:hover, .nav-link:active {
                    color: #f8f9fa;
                }
                `}
            </style> */}
            <Navbar.Brand href="/home" className="text-light">
                <img src={logo} width="24" height="24" />
                {' '}KU#
            </Navbar.Brand>
            <Nav className="justify-content-end">
                <Nav.Link className="text-light" href="/login">Login</Nav.Link>
                <Nav.Link className="text-light" href="/signup">Signup</Nav.Link>
                <Nav.Link href="/shoppingcart">
                    <img src={cart} width="30" height="30" />
                </Nav.Link>
                <Nav.Link className="text-light" onClick={() => handleClick()}>Logout</Nav.Link>
                <Nav.Link href="/admin/:id">
                    <img src={option} width="30" height="30" />
                </Nav.Link>
            </Nav>
        </Navbar>
    )
}

export default MainNav
Assignee
Assign to
Time tracking