Can't link main.css to index.html in Brackets


#1

I'm relatively new to html/css and is trying to create a website from scratch with Brackets.
I have my html code and I need the live preview to see if i'm coding my css correctly but nothing changes.
Pls look through my code and see if there's a problem and if am I linking the bootstrap correctly. Thanks.

<head>
	<meta charset="utf-8"/>
	<link rel="stylesheet" href="main.css">
	<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">	
</head>

#2

add these too

<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>

<!-- Latest compiled JavaScript -->
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

and
To ensure proper rendering and touch zooming, add the following tag inside the element:

<meta name="viewport" content="width=device-width, initial-scale=1">

#3

can we see your full html and css code? And a screenshot of the directory containing the html and css files


#4

I save them both in desktop/brackets. I stopped coding in main.css after it doesn't appear in Liew Preview.

<!DOCTYPE html>
<html lang="en">
	
	<head>
		<meta charset="utf-8"/>
		<link rel="stylesheet" type="text/css" href="main.css">
		<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">	
	</head>
	
	<body>
		<div class="header">
			<img src="https://dl.dropboxusercontent.com/u/96069926/3542-200.png"/>
			<h1>The Book Review</h1>
		</div>
		<nav>
			<ul>
				<li>Recommended Books</li>
				<li>About Me</li>
			</ul>
		</nav>
		<div class="left">
			<img src="https://dl.dropboxusercontent.com/u/96069926/the-girl-on-the-train.jpg" wdith='512' height="512">
			<div class="Book Details">
				<h3 class="title">The Girl On The Train</h4>
				<h4 class="author">By Paula Hawkins</h5>
				<p class="summary">Rachel takes the same commuter train every morning and night. Every day she rattles down the track and stops at the signal that allows her to daily watch the same couple breakfasting on their deck. And then she sees something shocking. Now everything’s changed. Unable to keep it to herself, Rachel goes to the police. But is she really as unreliable as they say? Soon she is deeply entangled not only in the investigation but in the lives of everyone involved. Has she done more harm than good?</p>
				<h4 class="ratings">Ratings: 3.7/5</h4>
			</div>
		</div>
	</body>
	
</html>

h1 {
	font-family: 'Arca Majora Heavy', monospace;
	font-size: 72px;
}

nav {
	
}

#5

is your stylesheet called main.css and in the same directory? The change do show up, such a local problem is super difficult to trouble shoot on a forum like this


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.