User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 423,306 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 5,374 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 784 | Replies: 8
Reply
Join Date: May 2007
Posts: 15
Reputation: npatel0317 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
npatel0317 npatel0317 is offline Offline
Newbie Poster

Logo on top of header out of alignment

  #1  
Mar 2nd, 2008
http://insanecricket.com/vision/

Please look at the site.

I would like to insert the logo (E-vision) on top of header but when I position it on top of header the logo is out out of alignment of the header different browsers different screen size messes up the logo on header. I would like to have logo and some text on top of header with fixed position on top of header without getting out of alignment.

Please help me out with this problem. I really appreciate your help.

Thanks
NPatel
Last edited by npatel0317 : Mar 2nd, 2008 at 5:54 pm.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2008
Posts: 24
Reputation: kashmir323 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
kashmir323 kashmir323 is offline Offline
Newbie Poster

Re: Logo on top of header out of alignment

  #2  
Mar 2nd, 2008
i think this should do it. i didnt test it out but this is just by experienced guessing =)

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  5. <title>CSS Test 2/22/08</title>
  6. <style type=text/css>
  7. #container
  8. {
  9. max-width: 800px;
  10. margin: 10px auto;
  11. background-color: #fff;
  12. color: #333;
  13. border: 1px solid gray;
  14. line-height: 130%;
  15. }
  16.  
  17. #top
  18. {
  19. background: #FFF url('headergraident.gif') bottom repeat-x;
  20. height: 165px;
  21. border-bottom: 1px solid gray;
  22. }
  23.  
  24. #top h1
  25. {
  26. padding: 0;
  27. margin: 0;
  28. }
  29.  
  30.  
  31.  
  32. #leftnav
  33. {
  34. float: left;
  35. width: 160px;
  36. margin: 0;
  37. padding: 1em;
  38. border-right: 1px solid #000;
  39. padding: 0 0 1em 0;
  40. font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Lucida, Geneva, Helvetica, Arial, sans-serif;
  41. background-color: #90bade;
  42. color: #333;
  43. }
  44.  
  45. #leftnav ul {
  46. list-style: none;
  47. margin: 0;
  48. padding: 0;
  49. border: none;
  50. }
  51.  
  52. #leftnav li {
  53. border-bottom: 1px solid #90bade;
  54. margin: 0;
  55. }
  56.  
  57.  
  58. #leftnav li a {
  59. display: block;
  60. padding: 5px 5px 5px 0.5em;
  61. border-left: 10px solid #1958b7;
  62. border-right: 10px solid #508fc4;
  63. background-color: #2175bc;
  64. color: #fff;
  65. text-decoration: none;
  66. width: 100%;
  67. }
  68.  
  69. html>body #leftnav li a {
  70. width: auto;
  71. }
  72.  
  73. #leftnav li a:hover {
  74. border-left: 10px solid #1c64d1;
  75. border-right: 10px solid #5ba3e0;
  76. background-color: #2586d7;
  77. color: #fff;
  78. }
  79.  
  80.  
  81.  
  82. #content
  83. {
  84. margin-left: 200px;
  85. border-left: 1px solid gray;
  86. padding: 1em;
  87. max-width: 46em;
  88. }
  89.  
  90. #clip
  91. {
  92. float: right;
  93. margin: 0 0 10px 10px;
  94. border: 1px solid #666;
  95. padding: 2px;
  96. }
  97.  
  98. #crew
  99. {
  100. float: left;
  101. margin-left: auto;
  102. margin-right: auto;
  103. text-align: center;
  104. border: 1px solid #666;
  105. padding: 2px;
  106. }
  107.  
  108. #farmad
  109. {
  110. text-align: center;
  111. }
  112.  
  113.  
  114.  
  115. #footer
  116. {
  117. clear: both;
  118. margin: 0;
  119. padding: .5em;
  120. color: #333;
  121. background: #FFF url('navbar.gif') bottom repeat-x;
  122. font-family: Verdana, Arial, Helvetica, sans-serif;
  123. color: #FFF;
  124. border-top: 1px solid gray;
  125. text-align: center;
  126. }
  127.  
  128. #leftnav p { margin: 0 0 1em 0; }
  129. #content h2 { margin: 0 0 .5em 0;
  130.  
  131.  
  132. </style>
  133. </head>
  134. <body>
  135. <div id="container">
  136. <div id="top">
  137. <img src="logo.gif" width="259" height="67" alt="E-Vision Emporia, KS"/>
  138. </div>
  139. <div id="leftnav">
  140. <p>
  141. <ul>
  142.  
  143. <li><a href="index.htm" title="Vist Our Homepage">Home</a></li>
  144. <li><a href="sports.htm" title="E-Vision Sports">Sports</a></li>
  145. <li><a href="lineup.htm" title="E-Vision Student Show">The Line-Up</a></li>
  146. <li><a href="orderdvd.htm" title="Order Copy of Broadcast">Order DVD</a></li>
  147. <li><a href="bonus.htm" title="About E-Vision">Bonus Content</a></li>
  148. <li><a href="sponsers.htm" title="E-Vision Sponsers">Sponsors</a></li>
  149. <li><a href="About.htm" title="About E-Vision">About</a></li>
  150. <li><a href="Contact.htm" title="Contact E-Vision">Contact</a></li>
  151. </ul>
  152.  
  153. <br>
  154.  
  155. </p>
  156. </div>
  157. <div id="content">
  158. <h2><img src="logo.gif" width="259" height="67" alt="E-Vision Emporia, KS"></h2>
  159. <p>
  160. <div id="clip">
  161. <embed src="http://www.usd253.org/evision/flvplayer.swf" width="320" height="240" allowfullscreen="true" allowscriptaccess="always" flashvars="&displayheight=240&file=http://www.usd253.org/evision/who.flv&height=240&image=http://www.usd253.org/evision/preview.jpg&width=320" />
  162. </div>
  163. The E-Vision crew is employed by Emporia High School students and their supervising instructors.
  164. E-Vision exists to serve the students and staff of Emporia High School by providing programming of events, activities, academics, sports student concerns, staff concerns, entrainment and any other topic appealing to the interests of this audience.
  165. However, E-Vision programming, will at all times, enhance and promote the well being of it's audience.
  166. The crew at E-Vision will promote what is right and best for it's audience even if what is morally or ethically wrong is legal.
  167. The crew at E-Vision, will follow at all times, the code and policies set forth by Emporia High School, USD #253, and it's administrators and instructors.
  168. <div id="crew">
  169. <img src=crew2007.2008.jpg alt="" width="320" height="240">
  170. </div>
  171.  
  172. </p>
  173. <p>
  174.  
  175.  
  176. </p>
  177. </div>
  178.  
  179. <div id="footer">
  180. Copyright &copy; 2008 E-Vision
  181. </div>
  182. </div>
  183.  
  184.  
  185. </body>
  186. </html>
Last edited by kashmir323 : Mar 2nd, 2008 at 7:40 pm.
Reply With Quote  
Join Date: May 2007
Posts: 15
Reputation: npatel0317 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
npatel0317 npatel0317 is offline Offline
Newbie Poster

Re: Logo on top of header out of alignment

  #3  
Mar 2nd, 2008
I did that and logo came on top of the bad i would like to be on the bar without moving even if you resize the window or bigger screen of monitor.

Check out this link

www.insanecricket.com/vision/picture.png
Reply With Quote  
Join Date: Jan 2008
Posts: 24
Reputation: kashmir323 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
kashmir323 kashmir323 is offline Offline
Newbie Poster

Re: Logo on top of header out of alignment

  #4  
Mar 2nd, 2008
oh like that? ok easy fix. on the image line i added b4 add the tag valign="top". i think atleast.
Reply With Quote  
Join Date: Jan 2008
Posts: 24
Reputation: kashmir323 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
kashmir323 kashmir323 is offline Offline
Newbie Poster

Re: Logo on top of header out of alignment

  #5  
Mar 3rd, 2008
unless you probly mean you want the header image to be ontop the background and not aligned above it. in that case use this code.

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  5. <title>CSS Test 2/22/08</title>
  6. <style type=text/css>
  7. #container
  8. {
  9. max-width: 800px;
  10. margin: 10px auto;
  11. background-color: #fff;
  12. color: #333;
  13. border: 1px solid gray;
  14. line-height: 130%;
  15. }
  16.  
  17. #top
  18. {
  19. background: #FFF url('headergraident.gif') bottom repeat-x;
  20. height: 165px;
  21. border-bottom: 1px solid gray;
  22. }
  23.  
  24. #logogo
  25. {
  26. background: url('logo.gif') bottom no-repeat;
  27. height: 165px;
  28. }
  29.  
  30. #top h1
  31. {
  32. padding: 0;
  33. margin: 0;
  34. }
  35.  
  36.  
  37.  
  38. #leftnav
  39. {
  40. float: left;
  41. width: 160px;
  42. margin: 0;
  43. padding: 1em;
  44. border-right: 1px solid #000;
  45. padding: 0 0 1em 0;
  46. font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Lucida, Geneva, Helvetica, Arial, sans-serif;
  47. background-color: #90bade;
  48. color: #333;
  49. }
  50.  
  51. #leftnav ul {
  52. list-style: none;
  53. margin: 0;
  54. padding: 0;
  55. border: none;
  56. }
  57.  
  58. #leftnav li {
  59. border-bottom: 1px solid #90bade;
  60. margin: 0;
  61. }
  62.  
  63.  
  64. #leftnav li a {
  65. display: block;
  66. padding: 5px 5px 5px 0.5em;
  67. border-left: 10px solid #1958b7;
  68. border-right: 10px solid #508fc4;
  69. background-color: #2175bc;
  70. color: #fff;
  71. text-decoration: none;
  72. width: 100%;
  73. }
  74.  
  75. html>body #leftnav li a {
  76. width: auto;
  77. }
  78.  
  79. #leftnav li a:hover {
  80. border-left: 10px solid #1c64d1;
  81. border-right: 10px solid #5ba3e0;
  82. background-color: #2586d7;
  83. color: #fff;
  84. }
  85.  
  86.  
  87.  
  88. #content
  89. {
  90. margin-left: 200px;
  91. border-left: 1px solid gray;
  92. padding: 1em;
  93. max-width: 46em;
  94. }
  95.  
  96. #clip
  97. {
  98. float: right;
  99. margin: 0 0 10px 10px;
  100. border: 1px solid #666;
  101. padding: 2px;
  102. }
  103.  
  104. #crew
  105. {
  106. float: left;
  107. margin-left: auto;
  108. margin-right: auto;
  109. text-align: center;
  110. border: 1px solid #666;
  111. padding: 2px;
  112. }
  113.  
  114. #farmad
  115. {
  116. text-align: center;
  117. }
  118.  
  119.  
  120.  
  121. #footer
  122. {
  123. clear: both;
  124. margin: 0;
  125. padding: .5em;
  126. color: #333;
  127. background: #FFF url('navbar.gif') bottom repeat-x;
  128. font-family: Verdana, Arial, Helvetica, sans-serif;
  129. color: #FFF;
  130. border-top: 1px solid gray;
  131. text-align: center;
  132. }
  133.  
  134. #leftnav p { margin: 0 0 1em 0; }
  135. #content h2 { margin: 0 0 .5em 0; }
  136.  
  137. </style>
  138. </head>
  139. <body>
  140. <div id="container">
  141. <div id="top">
  142. <div id="logogo"/>
  143. </div>
  144. <div id="leftnav">
  145. <p>
  146. <ul>
  147.  
  148. <li><a href="index.htm" title="Vist Our Homepage">Home</a></li>
  149. <li><a href="sports.htm" title="E-Vision Sports">Sports</a></li>
  150. <li><a href="lineup.htm" title="E-Vision Student Show">The Line-Up</a></li>
  151. <li><a href="orderdvd.htm" title="Order Copy of Broadcast">Order DVD</a></li>
  152. <li><a href="bonus.htm" title="About E-Vision">Bonus Content</a></li>
  153. <li><a href="sponsers.htm" title="E-Vision Sponsers">Sponsors</a></li>
  154. <li><a href="About.htm" title="About E-Vision">About</a></li>
  155. <li><a href="Contact.htm" title="Contact E-Vision">Contact</a></li>
  156. </ul>
  157.  
  158. <br>
  159.  
  160. </p>
  161. </div>
  162. <div id="content">
  163. <h2><img src="logo.gif" width="259" height="67" alt="E-Vision Emporia, KS"></h2>
  164. <p>
  165. <div id="clip">
  166. <embed src="http://www.usd253.org/evision/flvplayer.swf" width="320" height="240" allowfullscreen="true" allowscriptaccess="always" flashvars="&displayheight=240&file=http://www.usd253.org/evision/who.flv&height=240&image=http://www.usd253.org/evision/preview.jpg&width=320" />
  167. </div>
  168. The E-Vision crew is employed by Emporia High School students and their supervising instructors.
  169. E-Vision exists to serve the students and staff of Emporia High School by providing programming of events, activities, academics, sports student concerns, staff concerns, entrainment and any other topic appealing to the interests of this audience.
  170. However, E-Vision programming, will at all times, enhance and promote the well being of it's audience.
  171. The crew at E-Vision will promote what is right and best for it's audience even if what is morally or ethically wrong is legal.
  172. The crew at E-Vision, will follow at all times, the code and policies set forth by Emporia High School, USD #253, and it's administrators and instructors.
  173. <div id="crew">
  174. <img src=crew2007.2008.jpg alt="" width="320" height="240">
  175. </div>
  176.  
  177. </p>
  178. <p>
  179.  
  180.  
  181. </p>
  182. </div>
  183.  
  184. <div id="footer">
  185. Copyright &copy; 2008 E-Vision
  186. </div>
  187. </div>
  188.  
  189.  
  190. </body>
  191. </html>
Last edited by kashmir323 : Mar 3rd, 2008 at 7:45 pm.
Reply With Quote  
Join Date: Jan 2007
Posts: 2,556
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 114
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: Logo on top of header out of alignment

  #6  
Mar 3rd, 2008
Why not make one image with the logo and the bars in it?
Daylight-saving time uses more gasoline
Reply With Quote  
Join Date: May 2007
Posts: 15
Reputation: npatel0317 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
npatel0317 npatel0317 is offline Offline
Newbie Poster

Re: Logo on top of header out of alignment

  #7  
Mar 4th, 2008
thanks a lot kashmir
Last edited by npatel0317 : Mar 4th, 2008 at 5:26 pm.
Reply With Quote  
Join Date: Jan 2008
Posts: 24
Reputation: kashmir323 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
kashmir323 kashmir323 is offline Offline
Newbie Poster

Re: Logo on top of header out of alignment

  #8  
Mar 4th, 2008
yup. did you see what i did? oh and you also didnt close the last line of your css section with a } but i fixed that too for you.
Reply With Quote  
Join Date: May 2007
Posts: 15
Reputation: npatel0317 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
npatel0317 npatel0317 is offline Offline
Newbie Poster

Re: Logo on top of header out of alignment

  #9  
Mar 4th, 2008
Originally Posted by kashmir323 View Post
yup. did you see what i did? oh and you also didnt close the last line of your css section with a } but i fixed that too for you.

yes i have learned some new stuff thanks
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb HTML and CSS Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the HTML and CSS Forum

All times are GMT -4. The time now is 11:07 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC