1

Importing a css file in bootstrap react.

For navigation, an additional header.css file will be used. In bootstrap without react I embed the file as follows:

<Nav class="navbar-abc-header navbar-default navbar-fixed-top">

In bootstrap react this entry does not work.

        render ( ) {
            return (
                <Navbar navbar-abc-header fixedTop>
        ...
        );
    }

I can use <Navbar inverse fixedTop> but not my own css file.

As we the css file included right?

1
  • IIRC, reactjs uses className="classesgoeshere" Commented Sep 22, 2016 at 8:08

1 Answer 1

1

You need to use className in reactjs. class in a reserved keyword javascript hence you cannot use the same for defining CSS classes.

<Nav className="navbar-abc-header navbar-default navbar-fixed-top">
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.