Advertisement
Guest User

CSS ID's issue. Unable to style.

a guest
Apr 20th, 2013
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.67 KB | None | 0 0
  1. Hi I guys. I am stuck in a problem. I am learning HTML CSS these days and I am practicing a basic layout. My HTML is :
  2.  
  3. <!doctype html>
  4.  
  5. <html>
  6.  
  7. <head>
  8. <link rel="stylesheet" type="text/css" href="C:\Users\Karan-Mehul\Desktop\asssi.css" />
  9. <title>Assignment 1 </title>
  10. </head>
  11. <body>
  12. <div id="wrapper">
  13. <header>
  14. <h1> My First Website </h1>
  15. </header>
  16. <p> Welcome to my website! Here are a few things I enjoy Favourite Quotes
  17. Here is another favourite quote of mine Favourite Quotes
  18. Here is another favourite quote of mine
  19. And another
  20. And another
  21. </p>
  22.  
  23. <ul>
  24.  
  25.  
  26. <li> Web Dev </li>
  27. <li> Chess </li>
  28. <li> Reading </li>
  29. <li> Learning </li>
  30.  
  31.  
  32.  
  33. </ul>
  34.  
  35. <ol>
  36.  
  37.  
  38. <li> Web Dev </li>
  39. <li> Chess </li>
  40. <li> Reading </li>
  41. <li> Learning </li>
  42.  
  43.  
  44.  
  45. </ol>
  46.  
  47.  
  48. <div id="try">
  49. <p>
  50. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever ly with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
  51. </p>
  52.  
  53. <footer>
  54.  
  55. <p>
  56.  
  57. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever ly with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
  58.  
  59. </p>
  60.  
  61. </footer>
  62.  
  63.  
  64. </div>
  65. </body>
  66.  
  67. </html>
  68.  
  69. ----------------------------------My CSS----------------------------------------
  70.  
  71. body {
  72.  
  73. font-family: sans-serif;
  74.  
  75.  
  76. }
  77.  
  78. p
  79. {
  80. background-color: red;
  81. float: left;
  82. width: 330px;
  83. margin: 0px;
  84. padding-top: 20px;
  85. line-height: 37px;
  86. }
  87.  
  88. ul {
  89. background-color: green ;
  90. width: 250px;
  91. float: right;
  92. margin: 0px;
  93. margin-left: 50px;
  94.  
  95. }
  96.  
  97. #wrapper {
  98. width: 1000px;
  99. margin: auto;
  100. background-color: blue;}
  101.  
  102. li {
  103. list-style: none;
  104. padding: 5px;
  105. }
  106.  
  107. header {
  108.  
  109. text-align: center;
  110.  
  111.  
  112. }
  113.  
  114. ol {
  115. background-color: brown;
  116. width: 250px;
  117. float: right;
  118. margin: 0px;
  119. }
  120.  
  121. #try {
  122.  
  123. background-color: #005157;
  124. margin-top: 160px;
  125. margin-left: -30px;
  126. width: 500px;
  127. float: left;
  128.  
  129. }
  130.  
  131. footer
  132. {
  133.  
  134. width: 700px;
  135. background-color: green;
  136.  
  137. }
  138.  
  139. ----------------------------------Codes Over-------------------------------------
  140.  
  141. My problem is that I am not able to style anything in div id="try" and <footer>
  142.  
  143. Why is that happening ? And why I am getting red color by default ? I haven't specified any styling. Moreover the wrapper is styled as background-color:blue so even if the color had to come it should be blue, no? I am really frustrated and have been trying to solve it for past 1 day, but to no help.
  144.  
  145. Looking forward for some solution ! Thanks! :)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement