0

Why is it that the style is not working? why?

<html>
	<head>
	<title> Starbuzz Coffee</title>
	
	<style type=”text/css”>
		body {
	background-color: #d2b48c;
	margin-left: 20%;
	margin-right: 20%;
	border: 1px dotted gray;
	padding: 10px 10px 10px 10px;
	font-family: sans-serif;
	}
	</style>
	</head>
	
	<body>
	
		<h1>StarBuzz Coffee Beverages!</h1>
	
		
		<h2>House Blend , $1.49</h2>
		<p>A smooth, mild blend of coffee from mexico,Oblivia and Guatemala</p>
		
		<h2>Mocha Coffee Latter , $2.96</h2>
		<p>EsPresso, Steamed milk and Chocolate chip</p>
		
		<h2>Capuccino , $1.07</h2>
		<p>A mixture of Espresso, steamed milk and foam</p>
		
		<h2>Chai Tea , $2.59</h2>
		<p> A spicy drink with black tea, spices, milk and honey</p>
		
	</body>
	
</html>
8
Contributors
7
Replies
10
Views
6 Years
Discussion Span
Last Post by Dandello
0

hi chiiqui,
Your code is correct, some times this will happen in editors
just replace this code in ur version of code it will work

<style type="text/css">
	body {
	background-color: #d2b48c;
	margin-left: 20%;
	margin-right: 20%;
	border: 1px dotted gray;
	padding: 10px 10px 10px 10px;
	font-family: sans-serif;
	}
	</style>

Edited by anand01: n/a

0

What exactly is not working about it? You dont give enough information to make give an solution.

0

why dont you edit <style type="text/css" > this line manually ..ofcourse this will solve your problem..i cheked in my browser. i did copy and paste your code to my notepad and save it as .html extension. when i open the file in browser no result was showing. but inlice css commands were working. But when i edit <style type="text/css" > line manually without copy and paste it works..dont know how :D anyway problem solved :D

0

The problem basically occur because some of the editor will replace ' with ` which trigger the event

-1

hey i have checked to your code, This is working fine on my server. May be you have some problem in your server or be can you please describe more about problem ?

0
<style type=”text/css”>

This code snippet is using ' ”' instead of ' " '. Yes, it's a subtle difference, but it's wrong. (lps pointed this out as well.) You need a true text editor that won't substitute quotes on you.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.