Jump to content


  • Posts

  • Joined

  • Last visited

Stromgren's Achievements


Newbie (1/7)



  1. Hello.. I'm working on a site where i need a pad to make my columns reach the footer on the page. Here's the site: byvejen.dk/lb2The leftcolumn cant reach the bottom, so i placed a pad behind it. The HTML looks like this: <body><div id="container"><div id="leftcolumnpad"></div> <div id="header" title="LejeBasen.dk"> ... </div> <div id="leftcolumn" class="w210"> ... </div> <div id="maincolumn" class="w750"> ... </div> <div id="footer"> ... </div></div></body></html> I styled the pad like this: position:absolute;float:left;background-image:url(../images/structure/padleftw210cfff.png);background-repeat:repeat-y;background-position:left top;width:210px;min-height:100%;background-color:#fff;z-index:-1;margin:0;padding:0; But still the pad wont be longer than the leftcolumn. I played around with this for some time in Firebug, but i cant seem to make i change. Any help i apprecieted
  2. Once again youre the best dsonesuk Thanks!
  3. Hello allI found a dropdown menu which i am using in the top right corner of this site: http://byvejen.dk/lb/But after i moved the code around a bit it stopped working and i cant find the error. Im not that sharp with jQuery yet.Heres the script: <script type="text/javascript">var timeout = 500;var closetimer = 0;var ddmenuitem = 0;function jsddm_open(){ jsddm_canceltimer(); jsddm_close(); ddmenuitem = $(this).find('ul').eq(0).css('visibility', 'visible');}function jsddm_close(){ if(ddmenuitem) ddmenuitem.css('visibility', 'hidden');}function jsddm_timer(){ closetimer = window.setTimeout(jsddm_close, timeout);}function jsddm_canceltimer(){ if(closetimer) { window.clearTimeout(closetimer); closetimer = null;}}$(document).ready(function(){ $('#jsddm > li').bind('mouseover', jsddm_open); $('#jsddm > li').bind('mouseout', jsddm_timer);});document.onclick = jsddm_close;</script> And heres the HTML: <div id="header"> <div class="container"> <div class="columns"> <div class="logo"> <h1><a href="http://byvejen.dk/lb/">LejeBasen.dk</a></h1> </div> <div class="nav"> <ul> <li><a href="http://byvejen.dk/lb/">Hjem</a></li> <li><a href="index.php">Kategorier</a></li> <li><a href="index.php">Lej</a></li> <li><a href="index.php">Udlej</a></li> </ul> </div> <div class="search"> <form enctype="text" action="index.php"> <input type="text" name="searchfield" id="searchfield" value="Søg produkter" /> <select name="landsdel" id="landsdel"> <option selected="selected" id="choose">Landsdel</option> <option id="Osted">Osted</option> </select> <input type="submit" name="search_submit" id="search_submit" value="SØG" /> </form> </div> <div class="profile"> <ul id="jsddm"> <li><a href="#">Casper Strømgren</a> <ul> <li class="min_profil"><a href="#">Min profil</a></li> <li class="rediger_profil"><a href="#">Rediger profil</a></li> <li class="rediger_annoncer"><a href="#">Rediger annoncer</a></li> <li class="mine_udlejninger"><a href="#">Mine udlejninger</a></li> <li class="mine_bookinger"><a href="#">Mine bookinger</a></li> </ul> </li> </ul> </div> </div> </div></div> Any hints towards a solution is apprecieted
  4. Thanks eTianbun It seems the name i centered right now.. But the border still wont show.I changed the .profile selector properties to this: #header .container .columns .profile {float:left; width:168px; height:45px; border-right:1px solid #f7f8f9; border-left:1px solid #f7f8f9;} I need a border on both sides.
  5. Hello. I have some problems aligning a new dropdown menu here: http://byvejen.dk/lb/transport The dropdown menu will show if you hover your mouse over the name in the top right corner.. Here's the code: Header: #header {width:100%; height:45px; background-color:#20558a; margin:0; padding:0;} #header .container {width:960px; height:45px; padding:0; margin:0px auto 0px auto;} #header .container .columns {height:45px; text-align:left; padding:0; margin:0;} #header .container .columns .logo {float:left; width:210px;} #header .container .columns .nav {float:left; width:200px; height:45px;} #header .container .columns .search {float:left; width:380px;} #header .container .columns .profile {float:left; width:168px; height:45px; border-right:1px #f7f8f9 solid; border-right:1px #f7f8f9 solid;} Dropdown menu: #jsddm {width:auto; padding:0; margin:0px auto 0px auto; text-align:center;} #jsddm li {list-style:none; font-size:14px; margin:0; padding:0;} #jsddm li a {background:#20558a; text-decoration:none; color:#FFF; font-weight:bolder; white-space:nowrap; margin:0; padding:0;} #jsddm li ul {float:right; width:168px; position:absolute; margin:9px 0px 0px 770px; padding:10px; visibility:hidden; border-right:1px #1b4875 solid; border-bottom:1px #1b4875 solid; border-left:1px #1b4875 solid; z-index:2; text-align:left; background: #9bafc2;} #jsddm li ul li {display:inline; float:none; z-index:2; font-size:14px; font-weight:lighter; background-repeat:no-repeat; padding-left:22px; background-color:#9bafc2;} #jsddm li ul li a {background-color:inherit;} #jsddm li ul li a:hover {color:#20558a;} #jsddm li ul li.min_profil {float:left; font-size:18px; background-image:url(../images/16x16_icons/user.png); background-position:0px 3px; padding-bottom:10px;} #jsddm li ul li.rediger_profil {background-image:url(../images/16x16_icons/user_edit.png);} #jsddm li ul li.rediger_annoncer {background-image:url(../images/16x16_icons/application_edit.png);} #jsddm li ul li.mine_udlejninger {background-image:url(../images/16x16_icons/application_side_expand.png);} #jsddm li ul li.mine_bookinger {background-image:url(../images/16x16_icons/application_side_contract.png);} And the HTML: <div id="header"> <div class="container"> <div class="columns"> <div class="logo"> <h1><a href="http://byvejen.dk/lb/">LejeBasen.dk</a></h1> </div> <div class="nav"> <--content--> </div> <div class="search"> <--content--> </div> <div class="profile"> <ul id="jsddm"> <li><a href="#">Casper Strømgren</a> <ul> <li class="min_profil"><a href="#">Min profil</a></li> <li class="rediger_profil"><a href="#">Rediger profil</a></li> <li class="rediger_annoncer"><a href="#">Rediger annoncer</a></li> <li class="mine_udlejninger"><a href="#">Mine udlejninger</a></li> <li class="mine_bookinger"><a href="#">Mine bookinger</a></li> </ul> </li> </ul> </div> </div> </div></div> Now theres two problems.. First of all the two borders to the right and the left on the "profile" div wont show up in the header. And secondly, the name (Here its Casper Strømgren) isn't centered right in the div. I really hope someone can help, this has been driving me crazy for hours now..
  6. Hello Im sitting here with a done flash site, but every time i update it, most browser won't show the updates because the earlier version is cached. What would be the easiest way to get around this?
  7. Stromgren

    Header margins

    Thats genius I can't really understand why a feature so simple should be so hard to create. Anyways, thanks a lot dsonesuk
  8. Stromgren

    Header margins

    Thanks a lot, i didn't knew there was such a thing as default margin Now i have en ekstra question. On this site: http://byvejen.dk/lb/faq.php i need to make the left column reach the footer.. How can i make this work?
  9. Stromgren

    Header margins

    Hello.. I have a problem with this header http://byvejen.dk/lb/home . It creates a margin to the top and the sides. Does anyone know to get rid of this? CSS Code: #header { width:auto; height:45px; background-color:#20558a; } #header_container { width:960px; height:45px; margin-left:auto; margin-right:auto; }
  10. Hello I needed an interdependent form for a website. Since i don't know any JavaScript this has been pretty tricky and i still have some problems. This is the code I'm using: JavaScript: <script type='text/javascript'>var ss2Values = [ // 'Please choose a subject' ['Please choose a category'], // '3D Printer' ['Darwin', 'Huxley', 'Mendel', 'Printrbot', 'Prusa Mendel'], // 'Home' ['Bathroom', 'Bedroom', 'Decorations', 'Furniture', 'Home utilities', 'Household items', 'Kitchen', 'Livingroom', 'Outdoor'], // 'Mechanical' ['Gears', 'Nuts and bolts', 'Tracks and bogies'], // 'Fun' ['Games', 'Ornaments', 'Toys'], // 'Electrical' ['Games', 'Ornaments', 'Toys'], // 'Educational' ['Biological models', 'Chemical models', 'Mathematical', 'Physical models']];window.onload = function(){ var ss2 = new xSubSelect('sel20', 'sel21', null, ss2Values, ss2OnChange);}function ss1OnChange(s0, s1, s2){ alert( s0.options[s0.selectedIndex].value + ' / ' + s1.options[s1.selectedIndex].value + ' / ' + s2.options[s2.selectedIndex].value );}function ss2OnChange(s0, s1){ alert( s0.options[s0.selectedIndex].value + ' / ' + s1.options[s1.selectedIndex].value );}function xSubSelect(sSelId0, sSelId1, sSelId2, aValues, fnOnChange){ var s0 = document.getElementById(sSelId0); var s1 = document.getElementById(sSelId1); var s2 = sSelId2 ? document.getElementById(sSelId2) : null; if (s0 && s1) { s0.onchange = function() { var i, len, val; // clear existing options for s1 len = s1.options.length; for (i = 0; i < len; ++i) { s1.options[0] = null; } // insert new options for s1 len = aValues[s0.selectedIndex].length; for (i = 0; i < len; ++i) { val = aValues[s0.selectedIndex][i]; s1.options[i] = new Option(s2 ? val[0] : val); } // update s2 if (s2) { s1.onchange(); } }; if (s2) { s1.onchange = function() { var i, len; // clear existing options for s2 len = s2.options.length; for (i = 0; i < len; ++i) { s2.options[0] = null; } // insert new options for s2 len = aValues[s0.selectedIndex][s1.selectedIndex].length; for (i = 1; i < len; ++i) { s2.options[i - 1] = new Option(aValues[s0.selectedIndex][s1.selectedIndex][i]); } }; s2.onchange = function() { if (fnOnChange) { fnOnChange(s0, s1, s2); } }; } else { s1.onchange = function() { if (fnOnChange) { fnOnChange(s0, s1); } }; } s0.onchange(); // first init }}</script> <?php if (isset($_POST['submit'])) { $subject_id = $_POST['sel20']; $category_id = $_POST['sel21']; $output_form = 'no'; } else { $output_form = 'yes'; } if ($output_form == 'yes') { ?> <table> <tr> <td> <form name='form2' method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <label for="sel20">Subject and category:</label> <br /> <select id='sel20' name'sel20'> <option>Please choose a subject</option> <option value="3D Printer">3D Printer</option> <option value="Home">Home</option> <option Value="Mechanical">Mechanical</option> <option value="Fun">Fun</option> <option value="Electrical">Electric</option> <option value="Educational">Educational</option> </select> <br /> <select id='sel21' name='sel21'> </select> <p class="signup_mgrey_10px"><a href="request_category">My category is not there?</a></p> <input type="submit" name="submit" value="Upload" /> </form> </td> <td> <img src="../images/upload_guide.png" alt="Upload your 3D model" /> </td> </tr> </table> <?php } if ($output_form == 'no') { //Write data to databse $query = "INSERT INTO models (subject_id, category_id) VALUES ('$subject_id', '$category_id')"; mysqli_query($connection, $query) or die ('Data not inserted.'); } ?> The JavaScript part is from an example including 2 interdependent forms. So there might be code for both forms, since i don't know which parts i can delete. When i write to my database it only writes the category_id. The subject_id won't get set. I tried echoing out $subject_id right before writing the $query without any luck. Can anyone spot the problem? Thanks in advance.
  11. Okay! So how should i go around it if i want to achieve a result like this? Thanks
  12. Hello! I just ran my site through the validator and i got this error message: Line 72, Column 24:document type does not allow element "td" here The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed). One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error). This is the code: <table> <tr> <td> <img class="toprated_icon" src="images/orb_mechanic_small" alt="orb_mechanic_small" /> <td> <h2 class="toprated_cyan_12px_underline">Helical Gear</h2> <h3 class="toprated_mgrey_10px">Downloads: 2189</h3> </td> </td> </tr> </table> Can anyone tell me where i'm going wrong? I can't seem to figure this out.
  13. Thanks for the answer, that makes sense, but it still won't work for me.Heres what the code looks like i (tried) to make your changes: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Untitled Document</title><link href="http://code.google.com/apis/maps/documentation/javascript/examples/default.css" rel="stylesheet" type="text/css" /><script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=false"></script><script type="text/javascript">var geocoder; var map; function initialize() { geocoder = new google.maps.Geocoder(); var latlng = new google.maps.LatLng(-34.397, 150.644); var myOptions = { zoom: 8, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); } function codeAddress(addr) { var address = addr; geocoder.geocode( { 'address': address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { map.setCenter(results[0].geometry.location); var marker = new google.maps.Marker({ map: map, position: results[0].geometry.location }); } else { alert("Geocode was not successful for the following reason: " + status); } }); }</script></head><body onload="initialize()"><div id="map_canvas" style="width: 320px; height: 320px;"> <script type="text/javascript"> codeAddress('Copenhagen'); </script> </div></body> The map will still load somewhere i Australia instead of Copenhagen.
  • Create New...