Help in header

Reply

Join Date: Dec 2008
Posts: 1
Reputation: smarty9999 is an unknown quantity at this point 
Solved Threads: 0
smarty9999 smarty9999 is offline Offline
Newbie Poster

Help in header

 
0
  #1
Dec 28th, 2008
I created one webpage with HTML and when I am viewing in a maximized size its working correctly, but when reduced the size of the browser the header portion is not reducing its size but its creating vertical scroll bars in the header portion. I am pasting my code here, please have a look at it and help me please..


  1. <html>
  2. <head>
  3. <style>
  4. h1{text-align:"center";color:"black"; font-face:"Monotype Corsiva" size= "7"}
  5. h2{text-align:"center";color:"black";font-face:"monotype corsiva" }
  6. </style>
  7. <script type="text/javascript">
  8. var sndEl="audio.mp3" //Set to name and path of your sound file
  9. var music_on="music_on1s_o.gif" //Set to image to display while music is on
  10. var music_off="music_off1s_o.gif" //Set to image to display while music is off
  11. var active_img="active_img1_o.gif"
  12. var da=document.all
  13. var preload=[music_on, music_off, active_img]
  14. var preloading=new Array();
  15. for (var i_tem = 0; i_tem < preload.length; i_tem++){
  16. preloading[i_tem]=new Image();
  17. preloading[i_tem].src=preload[i_tem]
  18. }
  19.  
  20. function textReveal(el, state){
  21. var text=da? da.text : document.getElementById('text')
  22. text.style.visibility=state=='on'? 'visible' : ''
  23. el.src=state=='on'? active_img : el.lowsrc
  24. }
  25.  
  26. function toggleSound(el){
  27. var text=da? da.text : document.getElementById('text')
  28. if (da&&da.sound&&da.sound.src!==''){
  29. da.sound.src=''
  30. el.lowsrc=music_off
  31. text.innerHTML='&nbsp;'
  32. }
  33. else if (document.getElementById('snd')){
  34. sndEl=document.getElementById('snd')
  35. document.getElementById('sndC').removeChild(sndEl)
  36. el.lowsrc=music_off
  37. text.innerHTML='&nbsp;'
  38. }
  39. else if (da&&da.sound&&da.sound.src==''){
  40. da.sound.src=sndEl
  41. el.lowsrc=music_on
  42. text.innerHTML='&nbsp;'
  43. }
  44. else {
  45. document.getElementById('sndC').appendChild(sndEl)
  46. el.lowsrc=music_on
  47. text.innerHTML='&nbsp;'
  48. }
  49. }
  50.  
  51. </script>
  52. </head>
  53. <body bgcolor="white">
  54. <IMG BORDER="0" width="160" height="140" ALIGN="left" SRC="Logo.gif">
  55. <IMG BORDER="0" width="160" height="140" ALIGN="right" SRC="rushi.gif">
  56. <h1>గుంటూరు తిరుపతి</h1><h1>శ్రీ వెంకటేశ్వర స్వామి వారి దేవాలయం</h1>
  57. <color="black"></color>
  58. <style>ul{align:center;width:100%;height:100%;list-style-type:none;padding:1;margin:1;float:"center"}
  59. li{display:inline;}
  60. a{background-color:"red" ;text-decoration:none;padding:"1mm 5mm";border-center:"1px solid white"}</style>
  61. </head>
  62. <body bgcolor="black"><center>
  63.  
  64. <li><A HREF="HOME.HTML" target="f2" STYLE="display:inline"> HOME</A></li>
  65. <li><A HREF ="EVENTS.HTML" target="f2" STYLE="display:inline"> EVENTS</A></li>
  66. <li><A HREF="HISTORY.HTML" target="f2" STYLE="display:inline">HISTORY</A></li>
  67. <li><A HREF="SPECIAL_PUJAS.HTML" target="f2" STYLE="display:inline"> SPECIAL PUJAS</A></li>
  68. <li><A HREF="PHOTO_GALLERY.HTML" target="f2" STYLE="display:inline"> PHOTO GALLERY</A></li>
  69. <li><A HREF="MEMBERS.HTML" target="f2" STYLE="display:inline"> MEMBERS</A></li>
  70. <li><A HREF="CONTACT_US.HTML" target="f2" STYLE="display:inline"> CONTACT US</A></li>
  71. </ul></center>
  72. <script type="text/javascript">
  73. if (document.getElementById&&!document.getElementById('sound')){
  74. document.write('<div id="sndC" style="width:0;height:0;position:absolute;top:-100px:left:-100px;visibility:hidden;">')
  75. document.write('<embed id="snd" style="width:0;height:0;position:absolute;top:-1000px:left:-1000px;visibility:hidden;" src="'+sndEl+'" autostart="true" hidden="true" loop="true">')
  76. document.write('<\/div>')
  77. }
  78. if ((da&&da.sound)||document.getElementById)
  79. document.write('<img style="cursor:pointer;" lowsrc="'+music_on+'" src="'+music_on+'" onmouseout="textReveal(this, \'off\')" onmouseover="textReveal(this, \'on\');" onclick="toggleSound(this);"><span id="text"><\/span>')
  80. </script>
  81. </BODY>
  82. </html>
Last edited by peter_budo; Jan 6th, 2009 at 9:29 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Join Date: Oct 2005
Posts: 1,283
Reputation: roryt will become famous soon enough roryt will become famous soon enough 
Solved Threads: 14
roryt's Avatar
roryt roryt is offline Offline
Nearly a Posting Virtuoso

Re: Help in header

 
0
  #2
Dec 28th, 2008
smarty9999,

It's quite difficult to see what is actually going on in your code. You need to be really careful with using formatting (such as where you have opened the "style" tag) inside your html, this should really be in an external document or in your <head>.

Do you mean vertical scrollbars? So does the header section have to much height.

Another thing to point out: you seem to have your <head> and <body> tags in this order:

<head>
</head>
<body>
</head>!!!????
<body>
</body>

This really does not make sense? Have you created this with a visual editor (Dreamweaver/frontpage) or have you hand coded it?

Hope this points some things out.
PhotoShopthis
FlyingPen
If I have helped you please add to my reputation
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 596
Reputation: buddylee17 has a spectacular aura about buddylee17 has a spectacular aura about 
Solved Threads: 125
buddylee17's Avatar
buddylee17 buddylee17 is offline Offline
Posting Pro

Re: Help in header

 
0
  #3
Dec 28th, 2008
Please wrap your code in code tags:

[code=html] Put code here[/code]
Lost time is never found again.
- Benjamin Franklin
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,193
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 163
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Sensei

Re: Help in header

 
0
  #4
Dec 29th, 2008
You have html (deprecated html at that) in the styles.

You have something that can't change size in the header. On mouseover also can cause size troubles.

You defined things in pixels. Those can't change size.
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 174
Reputation: Jen0608 can only hope to improve 
Solved Threads: 10
Jen0608 Jen0608 is offline Offline
Posting Whiz

Re: Help in header

 
0
  #5
Dec 30th, 2008
i think it would be best if you use a specific size that would be compatible to any window size for your header. try using not more than 800 x 600.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC