user13786739
user13786739

Reputation:

Can't implement my own stylesheet with Bootstrap?

I've run into trouble using my own stylesheet while using Bootstrap. This is the beginning of my header.php (which I import in the beginning of index.php):

<html>
<head>
<link href="includes/css/bootstrap.min.css" rel="stylesheet">
<link href="includes/mystyle.css" rel="stylesheet">

EDIT: I've found out that for some reason I can include the file if it is in the same folder by: <link mystyle.css" rel="stylesheet"> but if I move the folder the includes folder and do as I did in the beginning, for some reason it won't import the stylesheet. Very weird...

Upvotes: 0

Views: 100

Answers (2)

user13786739
user13786739

Reputation:

I solved it by putting the file out of includes. I tried later putting it in the includes file again and reference it by <link href="includes/mystyle.css" rel="stylesheet">, and now it works. It might've been an spelling error. Case closed!

Upvotes: 0

Sagi Rika
Sagi Rika

Reputation: 2979

You might have to use a more specific selector or use !important (less recommended).

Try setting an id for your menu, lets say my-menu. Then, change the selector:

#my-menu {
  width: 300px;
  height: 400px;
}

If you don't want to use an ID, try adding !important:

.dropdown-menu {
  width: 300px !important;
  height: 400px !imporatnt;
}

Upvotes: 1

Related Questions