-
Posts
32 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by cerstrand_mace
-
-
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?
-
This problem was solved by changing the line-height options while creating the webkit on MyFonts
-
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.
-
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.
-
I have this really annoying problem with my webfont having different natural spacing on my Mac compared to the PC.Here's the difference:
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!
-
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.
-
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.
-
Hi!
I'm experiencing a wierd thing when I open my website in Firefox and Opera. The images loading in with a preloader is shown at actual size shortly before resizing to percentage-size according to my CSS. In Chrome the images appear as they should right from the start. What's the problem here?http://mace.macework.se/trycksaker/
Grateful for help!Thanks
-
Yes! I must have made a very clumsy mistake somewhere on the way. Now it works fine! Thanks alot!You seem to be missing a textarea with the ID "deltagare-emaillist". I can't see it on the page, and the error console says it can't find the element either.Javascript normally stops executing when it encounters an error. -
Your test-code works like a charm btw! So the problem must be somewhere else in my form-system.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". -
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".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>
-
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!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( -
OK, so I added the braces but it did't help. I still only get the first action. And YES I'm new to the whole Javascript shebang, hope that won't get my aid refusedYou're supposed to use curly braces to make a code block. W3Schools even teaches it that way. I'm not sure where you learnt Javascript.if(condition) { Multiple lines of code} else { More code}
-
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?
-
I solved this problem by putting all my values in a table instead, and then using a jquery tablesorter to order the values. Works like a charm! Thanks anyway!
-
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".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. -
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.
-
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=""; }
-
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!") }
-
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!") }
-
How do I get the specific value from the <input type> fields? I need to call the names of the fields right?Thanks a lot! I think I'll be able to pull it through with this -
Thanks a lot! I think I'll be able to pull it through with thishttp://w3schools.com...ryjsref_onclick (instead .innerHTML, use .value="") http://www.w3schools...reset_value.asp -
That seem to make sense care to give a more detailed description of how the code would look? I'd be very grateful!This can only be done with javscript, were you would target textarea on clicking of button and reset value to "" a emptystring -
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: 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!
Image width and height becomes 1px in IE
in CSS
Posted
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:
I changed it to:
Fixed! Thanks