Advertisement
Guest User

Untitled

a guest
Sep 16th, 2014
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.98 KB | None | 0 0
  1. Hello Guilherme,
  2.  
  3. Can you please run this code and see what is actually happening. I read your last messages but
  4. I think I will understand more if you could please solve these problems direclty. At this point I
  5. am still lost with advice, I should do better if I can see the answer.
  6.  
  7. 1) You gave #menu a: margin-right:10%, but it didnt work for me at all, so I ended up giving them
  8. padding-right:30px; padding-top:10px;, but when you resize the browser it is a distaster. Can you
  9. please tell me what % I should give my links so that the first link aligns nicely with 'Welcome'
  10. and the paragraphs below 'Welcome' and when I resize the browser my menu remains fluid?
  11.  
  12. 1a) Because I gave the links paddings, you will see in the web console that the entire menu
  13. is sticking padd the #header. How can I fix that?
  14.  
  15. 2) If you look at your web console, you will see that div with id="footer"(486 X 98) and the
  16. h2 header "About us" (691 x 29) have completely different measurements. How can I align
  17. the paragraph in the footer with the h2"About us"?
  18.  
  19. 3) YOu gave the paragraph a line-height of 20px; I thought line heights were usually 1.5.
  20. How does line-height:20px compare to a line-height:1.5? In fact what is the unit of line-height:1.5?
  21.  
  22. 4) The menu with a green background has a bottom border the color of grey. Does this grey
  23. bottom border come with the image?
  24.  
  25. 5) When you resize the browser, all the text collapses into each other, Can you please tell me
  26. exactly what I should change so that I can achieve a fluid layout.
  27.  
  28.  
  29. thanks
  30.  
  31.  
  32. <!DOCTYPE HTML>
  33. <html lang="en">
  34. <head>
  35. <title>Fluid Layout Example</title>
  36. <meta charset="UTF-8" />
  37. <style>
  38. *{
  39. margin:0;
  40. padding:0;
  41.  
  42. }
  43. a img{
  44. border:none;
  45. }
  46. input, select, textarea, body{
  47. font-family: Arial, Tahoma, sans-serif;
  48.  
  49. }
  50. h2{
  51. font-weight:normal;
  52. font-size:24px;
  53.  
  54. }
  55. p{
  56. font-size:13px;
  57. line-height:1.5;
  58.  
  59. margin-bottom:1.5em;
  60.  
  61.  
  62. }
  63. /*styling the header and menu
  64. ===========================================*/
  65. #header{
  66. height:56px;
  67. background: url(images/menu_background.png) repeat-x;
  68. position:relative;
  69. z-index:100;
  70.  
  71. }
  72. #logo{
  73. position:absolute;
  74. width:36%;
  75. top:90px;
  76.  
  77. }
  78. #logo a{
  79. display:block;
  80. margin: 0 auto;
  81. width:210px;
  82.  
  83. }
  84. #menu{
  85. position:absolute;
  86. width:64%;
  87.  
  88. right:0;
  89. top:25px;
  90.  
  91. }
  92. #menu a:hover, #menu a.current {
  93. color: #e6ff9b;
  94. }
  95.  
  96. #menu ul{
  97. list-style-type:none;
  98. margin-left:82px;
  99. }
  100.  
  101. #menu ul li{
  102. display:inline-block;
  103. }
  104. #menu a{
  105. display:inline-block;
  106. color:#FFF;
  107. text-decoration:none;
  108. height:23px;
  109. padding-right:30px;
  110. padding-top:10px;
  111. float:left;
  112.  
  113.  
  114. }
  115.  
  116.  
  117. /*styling the content
  118. ========================================*/
  119. html, body, #wrapper, #content, #content-inner{
  120. height:100%;
  121.  
  122. }
  123. #content{
  124. width:64%;
  125. background:pink;
  126. float:right;
  127. color:#FFF;
  128. background: #304100 url(images/content_background.png) repeat-x;
  129. margin-top:-56px;
  130. }
  131.  
  132. #content-inner{
  133. padding:96px 10% 40px 10%;
  134.  
  135. }
  136.  
  137. #content a {
  138. color: #FFFFFF;
  139. }
  140.  
  141. #content a:hover {
  142. text-decoration: none;
  143. color: #e6ff9b;
  144. }
  145.  
  146. #wrapper{
  147. background: url(images/footer_background.png) no-repeat bottom left;
  148.  
  149.  
  150. }
  151. /*styling the footer
  152. =================================================*/
  153.  
  154. #footer{
  155.  
  156. width:36%;
  157. margin-top:150px;
  158.  
  159. }
  160.  
  161. #footer p{
  162. width:200px;
  163. color: #231f20;
  164. line-height:15px;
  165. font-size:11px;
  166. margin:0 auto;
  167.  
  168.  
  169.  
  170. }
  171. </style>
  172. </head>
  173. <body id="bd-home">
  174. <div id="wrapper">
  175. <div id="header">
  176. <h1 id="logo">
  177. <a href="#">
  178. <img src="images/company_logo.png" alt="Company Logo" width="210" height="102" />
  179. </a>
  180. </h1>
  181.  
  182. <div id="menu">
  183. <ul>
  184. <li>
  185. <a id="bt-home" class="current" href="#">Home</a>
  186. </li>
  187. <li>
  188. <a id="bt-aboutus" href="#">About Us</a>
  189. </li>
  190. <li>
  191. <a id="bt-services" href="#">Services</a>
  192. </li>
  193. <li>
  194. <a id="bt-contactus" href="#">Contact Us</a>
  195. </li>
  196. </ul>
  197. </div>
  198. </div>
  199.  
  200. <div id="content">
  201. <div id="content-inner">
  202. <h2>Welcome</h2>
  203.  
  204. <p>
  205. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy
  206. nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi
  207. enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis
  208. nisl ut aliquip ex ea commodo consequat.
  209. </p>
  210.  
  211. <h2>About Us</h2>
  212.  
  213. <p>
  214. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh
  215. euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad
  216. minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut
  217. aliquip ex ea commodo consequat.
  218. <a href="#">&raquo; Learn more</a>
  219. </p>
  220. </div>
  221. </div>
  222.  
  223. <div id="footer">
  224. <p>
  225. Company Address, 200
  226. <br />
  227. City, State, Country
  228. <br />
  229. Postal Code 80000-000
  230. <br />
  231. 5555-5555
  232. <br />
  233. support@companyname.com
  234. </p>
  235. </div>
  236. </div>
  237. </body>
  238. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement