0
.bootstrap {
    @import url("https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js");
}

This is not working. Any ideas? Is there a way to debug this?

Thank you!

2 Answers 2

2

Use @import only in css file

 @import url("stylesheetB.css");

so in your case

 @import url("https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css");

reference

for js files use the script tag

 <script src=https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js></script>

visit getbootstrap under css to get familiar with bootstrap classes and grid

That means the full HTML structural elements

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
    <title></title>
    <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0, minimal-ui" />
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <meta name="author" content="" />
    <link rel="shortcut icon" href="favicon.ico">
    <!--<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" />-->
  <style>
  @import url("https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css");
   
</style>
</head>

<body>

  <header>
<!-- header content goes in here -->
  </header>

  <nav>
<!-- navigation menu goes in here -->
  </nav>

  <section id="sidebar1">
<!-- sidebar content goes in here -->
  </section>

  <section id="main" class=container>
<!-- main page content goes in here -->
  </section>

  <aside>
<!-- aside content goes in here -->
  </aside>

  <footer>
<!-- footer content goes in here -->
  </footer>
 <script src=https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js></script>
   </body>
</html>

Sign up to request clarification or add additional context in comments.

2 Comments

How can I use it in HTML <style type="text/css"></script>
@nofear87 please see the code snippet on how to use it.
1

You should try

 @import url("https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js");

Why wrapping into a boostrap{} ?

5 Comments

Becuase I want that Bootstrap is only available in this class
Do you use CSS preprocessors ?
You can only imbricate proprieties by using a preprocessor, like SASS, you should try use them, because it's not allow to have kind of namespace in CSS. Hope i'm clear
Yes, I think so...and what should I change in the sass to get it only working for bootstrap class?
I'm not sure about the fact that you can do an import like this, butif it work, it will work with the code just like you posted in the answer

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.