| | |
image position in a container.
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: May 2007
Posts: 15
Reputation:
Solved Threads: 1
I am trying to position a javascript with in my 800px container but when i try to do that the script stays outside of the container.
Here is my html code for the javascript
Here is the full css stylesheet.
To be breif i want that javascript "#hads" to be postioned inside the container so when you resize your browser screen everything stays postion where i set it to be.
Thanks in advanced for your help.
Here is my html code for the javascript
HTML and CSS Syntax (Toggle Plain Text)
<div id="hads"> <SCRIPT language="Javascript"> function image() { }; image = new image(); number = 0; image[number++] = "<img src='cdtradepost.gif' border='0'>" image[number++] = "<img src='farm.gif' border='0'>" image[number++] = "<img src='gambinos.gif' border='0'>" image[number++] = "<img src='rocky.gif' border='0'>" increment = Math.floor(Math.random() * number); document.write(image[increment]); </SCRIPT> </div>
Here is the full css stylesheet.
HTML and CSS Syntax (Toggle Plain Text)
html { font-size: 100%; } body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 62.5%; margin: 0; padding: 0; } #container { width: 800px; margin: 0 auto 0 auto; } h1#header { margin: 0; height: 95px; padding-bottom: 50px; background: #FFF url('headergradient.gif') bottom repeat-x; } #logo { position: relative; top: 15px; left: 17px; } #hads { position: fixed; top: 0px; left: 0px; } #content { margin-top: 20px; } #content .gradient, #footer { font-size: 1.1em; font-weight: bold; color: #FFF; } #left { width: 169px; float: left; } #right { width: 169px; float: right; } #main { width: 442px; margin: 0 10px 0 10px; float: left; font-size: 1.2em; color: #444; margin-bottom: 30px; } .clear { clear: both; } #content .gradient { height: 24px; border: 1px solid #191bcb; margin: 0; } #left .gradient { background: #404ac0 url('leftgradient.gif') no-repeat; padding: 5px 10px 0 20px; } #right .gradient { background: #404ac0 url('rightgradient.gif') no-repeat; padding: 5px 20px 0 10px; } #footer { margin-top: 30px; text-align: center; border: 1px solid #191bcb; height: 24px; padding: 5px 10px 0 10px; background: #404ac0 url('footergradient.gif') repeat-x; } ul#menu { margin: 5px 0 5px 0; padding: 0; } ul#menu li { margin-bottom: 4px; list-style-type: none; } ul#menu li a { display: block; padding: 3px; text-decoration: none; } ul#menu li a:hover { background-color: #7071ec; color: #FFF; } ul#menu li.alt a:link, ul#menu li.alt a:visited { background: #CCC; } #right .box { margin-top: 3px; border: 1px solid #AAA; background: #DCDCDC; text-align: center; color: #333333; padding: 4px; } #content h1 { font-size: 1.8em; font-weight: bold; border-bottom: 2px dotted #acace5; } #content h2 { font-size: 1.6em; font-weight: normal; border-bottom: 1px solid #acace5; } #content h3 { font-size: 1.3em; font-weight: bold; } #content img { border: 1px dotted #CCC; padding: 4px; margin: 3px; } #main p { line-height: 1.8em; }
To be breif i want that javascript "#hads" to be postioned inside the container so when you resize your browser screen everything stays postion where i set it to be.
Thanks in advanced for your help.
Last edited by npatel0317; Apr 15th, 2008 at 4:19 pm.
![]() |
Other Threads in the HTML and CSS Forum
- Previous Thread: can't figure out how...
- Next Thread: html template help
Views: 2417 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for HTML and CSS
2002 appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity create css deleted design development displayimageinsteadofflash dreamweaver drupal emailmarketing epilepsy explorer firefox flash font fonts form format frontpage google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft missing mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization perl pnginie6 positioning problem scroll seo shopping studio swf swf. templates textcolor theme timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7 wordpress xml xsl





