Jump to content

cerstrand_mace

Members
  • Posts

    32
  • Joined

  • Last visited

Posts posted by cerstrand_mace

  1. So I see...

    <img width="" height="" alt="Bar ends" src="http://tec.macework.se/wp-content/uploads/2013/11/C2400300-300x300.jpg">

    Try deleting those null width and height attributes.

     

    That accually did the trick! I use Woocommerce and simply enough all I had to do was removing the function inside the template page that gets the dimensions of the thumbnails.

     

    Here's the code that I edited in the woocommerce-template.php:

    echo '<img src="' . $image . '" alt="' . $category->name . '" width="' . $dimensions['width'] . '" height="' . $dimensions['height'] . '" />';

    I changed it to:

    echo '<img src="' . $image . '" alt="' . $category->name . '"  />';

    Fixed! Thanks :good:

     

  2. I've stumbled upon yet another trouble with internet explorer where my images mysteriously becomes 1px by 1px instead of sizing according to it's container like other browsers.I googled the problem and it seems like a lot of people gets this problem when applying heigh:auto; to an image. I accually had this applied but it wasn't solved by removing it.I'll just leave an url for the page here so you can see for yourselves:http://tec.macework.se/catalog/products/components/

     

     

    Any clues?

  3. I know there's a bug for input buttons and applying height in safari, so i don't know is the same type of issue, but if you add background-color: (if it does not have one yet! can't tell), this did fix the problem.

    Thanks for the answer!

    There's a background color with opacity on my buttons. They are not input buttons however.

  4. The width is simple, just use width:100%; on each div you want to be as wide as the window. If you want some margin on the sides with the div centered you just set the width to be 90% (for example) and then add margin: 0 auto; for centering the divs. (Be aware that you can't float the elements if you want to center with margin.)

     

    You should be able to do the same thing with the height if you set both the body and the html to height:100% and then set the inner divs heights so that the total height is 100%.Beware that the height of the divs can become very tight on smaller screens.

  5. I have this really annoying problem with my webfont having different natural spacing on my Mac compared to the PC.Here's the difference:

    MAC:post-111293-0-88799600-1383033651_thumb.jpg

     

    PC:post-111293-0-93336700-1383033650_thumb.jpg

     

     

    As you can see the natural spacing is beneath the text on Mac and above on PC. The problem is cross browser. I've tried all kinds of css tweaking including line-height, padding, height of div; but as you can see the problem is apparently not in the css but in the font rendering itself.Anyone with a clue about this?Thanks!

  6. When I change the display:inline-block to display:block the problem disappears in firefox, but then the preloader size breaks in chrome. The problem seems to be that the anchor tag generated by the script is overflowing the list-item which sets the size of the image inside. That achor tag should be sized according to the list item and not by itself.

  7. Depending on internet speed, image size, some will see this, the original image will load, following the css rule applied to it, then after the page is fully rendered, the preloader() will run to cache these gallery images, which seems pointless, as they are already loading/loaded, by the time it is started.

     

    The preloader is usually used on images not currently viewed on page load, one example is the original larger image that would appear as a pop up, when a thumb nail of the larger image is selected.

     

    another problem is you have css styling within the body of the page, when it should be between the head tags, or in a external css file instead.

     

    Thanks for the answer!The preload script I'm using is set to hide the image elements until all images are loaded before fading them in, replacing the loader-gifs. The problem seems indeed to be with the CSS not loading quick enough in some browsers causing the image size to be set too late, but that doesn't show in the Firefox Network-flow.

     

    About the CSS inside the body, I assume you're referring to the content of my cronjob.php that is loaded at the top of the page. I don't see why I shouldn't use that CSS within the body.

  8. If you can show the HTML you're using I can test it on my computer and see what's not working. I'll take a closer look at your current code until then. Update:Here's my test code and it's working:
    <!DOCTYPE html><html>	<head>		<script>		function deltagare(){			var myTextField1 = document.getElementById('namn');			var myTextField2 = document.getElementById('epost'); 			if(myTextField1.value != "" && myTextField2.value != "") {				document.getElementById("deltagare-list").value+=myTextField1.value+" "+"("+myTextField2.value+")"+"\n";				document.getElementById("deltagare-emaillist").value+=myTextField2.value+",";				document.getElementById('namn').value="";				document.getElementById('epost').value="";			} else {				alert("Skriv in både namn och epost!");			}		}		</script>		<title>Test</title>	</head>	<body>		<div>			<input type="text" id="namn">			<input type="text" id="epost">			<textarea id="deltagare-list"></textarea>			<textarea id="deltagare-emaillist"></textarea>			<input type="button" value="Test" onclick="deltagare();">		</div>	</body></html>

    http://scooper.se/novo/ama/ama-af-12/ See if you can make something out of this. The script is used to add names and email-adresses to a textarea (along with some other functions connected to a mail system). The textarea can be found in the form displayed by the button that says "Klicka här för anmälan".
  9. I have no problem with your inexperience, everybody goes through a phase of learning and I'm glad to help. I just would like to talk with the people who taught you or provided you with the information you learnt from, teaching badly is a disservice to people. The problem you're experiencing after fixing the first mistake probably has to do with ending your lines with a comma (,) instead of a semi-colon( ;)
    I learn mostly by doing and googling by myself. I'm well aware of my need to get through the basics, but I just haven't had the time yet, sry for that :)Anyway, I'm VERY grateful for your help. I suspected that the semi-colons could be the problem but I've tried that too with no result. Any other ideas?Thank you!
  10. I have this issue with a function where I want to execute 4 different actions inside an if statement. My code looks like this:

    function deltagare(){var myTextField1 = document.getElementById('namn');var myTextField2 = document.getElementById('epost'); if(myTextField1.value != "" && myTextField2.value != "")document.getElementById("deltagare-list").value+=myTextField1.value+" "+"("+myTextField2.value+")"+"\n",document.getElementById("deltagare-emaillist").value+=myTextField2.value+",",document.getElementById('namn').value="",document.getElementById('epost').value=""; elsealert("Skriv in både namn och epost!"); }

    In this way only the first action gets executed. How can I add the other ones properly?

  11. You want to use those values to sort the data? Does the query_posts function have a way to specify sort criteria? If not, if it returns an array of posts, then you can use a custom sort function to sort the array.
    How would such a custom sort function look like? The values I wan't to sort this array by are the ones I have in a repeater-field, a date to be specific. The subfield name is "slutdatum".
  12. I want to order my query by one of my custom field values. That custom field value is a repeater field inside a regular custom field. However, the problem is that my query is set to only show pages from a certain template, wich is done by the meta_key and meta_value attributes. As far as I get it the meta_key and meta_value should also be used to order my query. How can I do both? My query looks like this:

    query_posts(array( 		'meta_key' => '_wp_page_template',		'meta_value' => 'template-kursny.php',		'showposts' => -1,		'post_type' => 'page', 		));

    I've tried to google this for a while now and I've found similar cases but haven't found a working solution yet.

  13. I've now managed to rewrite the script to work more properly! Both <input type>fields must be filled in for the function to execute. I also added a function for a clear-button that clears the <textarea> from values.

    function deltagare(){var myTextField1 = document.getElementById('namn');var myTextField2 = document.getElementById('epost'); if(myTextField1.value != "" && myTextField2.value != "")document.getElementById("deltagare-list").value+=myTextField1.value+" "+"("+myTextField2.value+")"+"\n"; elsealert("Skriv in både namn och epost!")  } function rensadeltagare(){ document.getElementById("deltagare-list").value=""; }

  14. Solved the spaces and breaks!

    function deltagare(){var myTextField1 = document.getElementById('namn'); if(myTextField1.value != "")document.getElementById("deltagare-list").value+=myTextField1.value+" ";  elsealert("Skriv in namn!")  var myTextField2 = document.getElementById('epost'); if(myTextField2.value != "")document.getElementById("deltagare-list").value+="("+myTextField2.value+")"+"\n"; elsealert("Skriv in epost!")  }

  15. I've managed to create a script that pulls text-values from my <input type> fields! However, I would like a space between the two entered values, and then a <br> to make a new row to the next entry. My javascript looks like this

    function deltagare(){var myTextField1 = document.getElementById('namn'); if(myTextField1.value != "")document.getElementById("deltagare-list").value+=myTextField1.value;  elsealert("Skriv in namn!") var myTextField2 = document.getElementById('epost'); if(myTextField2.value != "")document.getElementById("deltagare-list").value+=myTextField2.value; elsealert("Skriv in epost!") }

  16. Hi! I'm new to the whole form-making business and currently beating my way though the basics. Right now i'm clueless about what seems to be a pretty simple and straightforward function. I want my visitor to be able to add values from two different <input-type>-fields into a <textarea>. These two values (being name and e-mail) should become a single row in the <textarea>. The visitor should also be able to remove desired generated rows with a simple click on the "remove selected"-button. The result should look like this: post-111293-0-96014700-1365499403_thumb.jpg This part of my form looks like this thus far:

    <div class="deltagare-rubrik">Namn:</div>			  <input type="text" size="45" name="deltagare-namn" value"">			  <div class="deltagare-rubrik">E-post:</div>			  <input type="text" size="45" name="deltagare-epost" value"">			  <br />			  <input type="button" name="deltagare-add" value="Add" class="button">			  <br />  			  <textarea name="deltagare-list" class="deltagare-list" readonly="true"></textarea>						  <input type="button" name="deltagare-remove" value="Remove selected" class="button">

    Very grateful for help, thanks!

×
×
  • Create New...