• Web Dev Questions That Don't Need Their Own Thread v4
    5,001 replies, posted
[QUOTE=YourStalker;44785343]Hey, I have an issue where I set a header and footer to be 100% width in a fixed position but for some reason there are 5 or so pixels to the left that they don't cover. Any idea how I could fix this? [url]http://i.gyazo.com/883727acb054844414f09c7cae874b40.png[/url] The colors and most of the stuff are temporary. I just wanna get the layout done. Thanks :)[/QUOTE] Can you please give some code instead?
the body probably has padding
this is an easy solution you can find just by inspecting element
[QUOTE=Shadaez;44769439]code works fine, you're just trying to manipulate the dom before it's finished loading, do this: [code] var w = window.open(); $(w.document).ready(function(){ $(w.document.body).html(msg); }); [/code][/QUOTE] Beautiful! Thank you soso much!
[QUOTE=YourStalker;44785343]Hey, I have an issue where I set a header and footer to be 100% width in a fixed position but for some reason there are 5 or so pixels to the left that they don't cover. Any idea how I could fix this? [url]http://i.gyazo.com/883727acb054844414f09c7cae874b40.png[/url] The colors and most of the stuff are temporary. I just wanna get the layout done. Thanks :)[/QUOTE] body { padding: 0; } Might want to start working on your own reseter in css so you know where everything is, otherwise take a look at [url]http://meyerweb.com/eric/tools/css/reset/[/url] Dont use it just take a look at it and make your own, this is made for him and what he wants, but the idea is pretty neat imo.
[IMG]http://i.imgur.com/XpSHZS0.png[/IMG] vs [IMG]http://i.imgur.com/zmuXm6K.png[/IMG] [IMG]http://www.facepunch.com/fp/ratings/tick.png[/IMG] for 1 [IMG]http://www.facepunch.com/fp/ratings/cross.png[/IMG] for 2 Or give me some creative criticism because I just can't seem to get it right
1's border got WAY too much contrast to its surroundings and the form itself.
[QUOTE=Coffeee;44800371][IMG]http://i.imgur.com/XpSHZS0.png[/IMG] vs [IMG]http://i.imgur.com/zmuXm6K.png[/IMG] [IMG]http://www.facepunch.com/fp/ratings/tick.png[/IMG] for 1 [IMG]http://www.facepunch.com/fp/ratings/cross.png[/IMG] for 2 Or give me some creative criticism because I just can't seem to get it right[/QUOTE] We can't really give you good feedback on this when it's completely out of the context it's going to be seen in on the page. What does the rest of the page look like?
[QUOTE=KmartSqrl;44800667]What does the rest of the page look like?[/QUOTE] From what I saw from the last time the rest of the website currently is in orange with those black borders that are thicker than old Nokia phones. To be honest without the black borders the design looks really clean and nice
[QUOTE=djjkxbox360;44800725]From what I saw from the last time the rest of the website currently is in orange with those black borders that are thicker than old Nokia phones. To be honest without the black borders the design looks really clean and nice[/QUOTE] This [url]http://vrondakis.com/[/url]
[QUOTE=Moofy;44804641]This [url]http://vrondakis.com/[/url][/QUOTE] I'm not really a fan of the design...
[QUOTE=Moofy;44804641]This [url]http://vrondakis.com/[/url][/QUOTE] Logo in png... Shame on you, svg or use the actual font :P
Just use the actual font, it's pointless to use an SVG or an image when it's just plain text, plus the rendering looks weird on my side
Hey guys, are there any good websites for free or cheap good looking templates?
[QUOTE=Knoxed;44824347]Hey guys, are there any good websites for free or cheap good looking templates?[/QUOTE] Cheap and good don't really come hand in hand in web design, but there might be some cheap ones somewhere. It's really worth it to create the layouts yourself as you can do it however you like, if you struggle with writing the html and css you could use a WYSIWYG editor such as Macaw [url]http://macaw.co[/url]
Recommended domain name registrar? I know Gandi is pretty popular but I just want to make sure I'm not missing out on anything better.
[QUOTE=Zazibar;44828772]Recommended domain name registrar? I know Gandi is pretty popular but I just want to make sure I'm not missing out on anything better.[/QUOTE] Namecheap is pretty good, fair prices, good customer support (the one or two times you'll ever need it) and they usually got some coupons for registrations/transfers. Just searched my email, in case you're interested: "And POWERFLOWER gets you a sunny discount on one year of registration or transfer for any .com, .net, .org, .info or .biz domain."
What's the proper way of using sqlite parameters? I've been trying to make a small orm (for learning purposes) but I can't get the sql parameters to work , it just returns a "sqlite3.OperationalError: near "?": syntax error" every time. [code] import sqlite3 con = sqlite3.connect(":memory:") curs = con.cursor() curs.execute("CREATE TABLE IF NOT EXISTS testname(?,?)", ("ID int","NAME text")) [/code] I feel like I'm doing something really dumb (and I probably am), but I can't get the parameters work in any shape or form.
Whenever I begin to add text to my nav-bar, it shafts it all by pushing it down. It's really stumped me, I can't figure out what's causing it. Anyone got the answer? [url]http://jsfiddle.net/6JK3E/[/url] [editline]19th May 2014[/editline] Scratch that, I was missing a float: right; line. Hey, I'm new :(
Did you post your whole front page into jsfiddle, what's wrong with you man
[QUOTE=Coment;44859634]Today, on our episode of PHP does weird shit just because... I have a script that uses imagettftext to print some text to an image (:v:) using consola.ttf (the one that comes with Windows). While it's quite long by itself, I could replicate the problem with the next code: [CODE] <?php error_reporting(E_ALL); //header ('Content-Type: image/png'); $im = @imagecreatetruecolor(120, 20) or die('Cannot Initialize new GD image stream'); $text_color = imagecolorallocate($im, 233, 14, 91); imagettftext($im, 20, 0, 11, 21, $text_color, 'consola.ttf', 'I like cookies'); imagepng($im); imagedestroy($im); print "<br />"; print_r(error_get_last()); ?> [/CODE] Now, if 'consola.ttf' is on the same directory as the executing script, it shouldn't give any problem... But it actually does. The output of that code is [QUOTE]‰PNG  IHDRxÉ0n¤IDATX…íÁ‚ ÿ¯nH@Ï4jIEND®B`‚ Array ( [type] => 2 [message] =>[B][I] imagettftext(): Could not find/open font [file] => /var/www/coment/dammit.php[/I][/B] [line] => 7 )[/QUOTE] It seems like it's not just my problem, because even the manual page gives one or two fixes to that problem. They don't do anything, though, in my case (both putenv and __DIR__. ) Anyone got any idea what could be causing this?[/QUOTE] -- Well, I finally found the solution. For the next one that googles this question, or for the time-travelling me of the past, you need to put the font .ttf on another folder. Then, at the start of the script (or somewhere before the imagettftext, I guess), you need to put [code] $fontpath = realpath('./fonts/'); putenv('GDFONTPATH='.$fontpath); $font = "consola"; [/code] (where realpath indicates that folder you created, and font is the name of the font in question without the ttf.)
I have been trying to make my scroll to load system... To do this I use Jqueries scrollTop and compare its value to scrollHeight. Everythnig checks out fine.... Its just that scrollTops value is about 700 lower than the scrollHeight value. Meaning, when I scroll to the bottom, im about 700 behind the actual scrollHeight... The element Im using these functions on is a div with overflow:auto. Any ideas?
[QUOTE=Chizbang;44861498]I have been trying to make my scroll to load system... To do this I use Jqueries scrollTop and compare its value to scrollHeight. Everythnig checks out fine.... Its just that scrollTops value is about 700 lower than the scrollHeight value. Meaning, when I scroll to the bottom, im about 700 behind the actual scrollHeight... The element Im using these functions on is a div with overflow:auto. Any ideas?[/QUOTE] [url=http://stackoverflow.com/a/13365]This might help.[/url]
[QUOTE=supersnail11;44861519][url=http://stackoverflow.com/a/13365]This might help.[/url][/QUOTE] Tried that but this seems to be the output: [code] function (e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)} [/code]
[QUOTE=Chizbang;44862093]Tried that but this seems to be the output: [code] function (e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)} [/code][/QUOTE] That wasn't a "copy and paste this", that was a "you should use the information in this answer to help you solve your problem."
[QUOTE=supersnail11;44863450]That wasn't a "copy and paste this", that was a "you should use the information in this answer to help you solve your problem."[/QUOTE] My bad. It was actually because I derped on the object. (Don't ask) Thanks for the link.
I've been googling for a little bit but I can't seem to find what I want: What I'm looking for is a textbox slider integer selector input. What I mean by that is a textbox which you can click and drag up to move the integer in the textbox up in value, or drag down to move the integer down in value. Has anyone ever created anything like this and would be willing to share? Or does anyone know of an easy way to accomplish this? [editline]21st May 2014[/editline] This is what I ended up coming up with an hour and a half later: [CODE] $("#percentPicker-1").val(eventsLogged); $("#percentPicker-1").mousedown(function() { clicking = true; }); $(document).mouseup(function() { clicking = false; }); $(window).mousemove(function(event) { if (clicking == true) { if (typeof startclick != "undefined") { if (event.pageY < startclick) { eventsLogged++; } else { eventsLogged--; } } startclick = event.pageY; //eventsLogged++; if (eventsLogged < 0) { eventsLogged = 0; } else if (eventsLogged > 100) { eventsLogged = 100; } $("#percentPicker-1").val(eventsLogged); } else { return; } }); [/CODE] Does anyone have a better way of doing this? Maybe something more visual?
Ok, another follow-up question: How do I turn the above code into a standard input so I can reuse it and not copy and paste the same code for each percentPicker ID? Is a function the best way to go?
[QUOTE=Poo Monst3r;44869708]Ok, another follow-up question: How do I turn the above code into a standard input so I can reuse it and not copy and paste the same code for each percentPicker ID? Could someone just point me in the right direction?[/QUOTE] [QUOTE=Poo Monst3r;44868686]I've been googling for a little bit but I can't seem to find what I want: What I'm looking for is a textbox slider integer selector input. What I mean by that is a textbox which you can click and drag up to move the integer in the textbox up in value, or drag down to move the integer down in value. Has anyone ever created anything like this and would be willing to share? Or does anyone know of an easy way to accomplish this? [editline]21st May 2014[/editline] This is what I ended up coming up with an hour and a half later: [CODE] $("#percentPicker-1").val(eventsLogged); $("#percentPicker-1").mousedown(function() { clicking = true; }); $(document).mouseup(function() { clicking = false; }); $(window).mousemove(function(event) { if (clicking == true) { if (typeof startclick != "undefined") { if (event.pageY < startclick) { eventsLogged++; } else { eventsLogged--; } } startclick = event.pageY; //eventsLogged++; if (eventsLogged < 0) { eventsLogged = 0; } else if (eventsLogged > 100) { eventsLogged = 100; } $("#percentPicker-1").val(eventsLogged); } else { return; } }); [/CODE] Does anyone have a better way of doing this? Maybe something more visual?[/QUOTE] This is kinda funny. All you needed is [code] <input type = "number"> [/code] Although you have to use the mousewheel or arrow keys
[QUOTE=djjkxbox360;44869754]This is kinda funny. All you needed is [code] <input type = "number"> [/code] Although you have to use the mousewheel or arrow keys[/QUOTE] Yeah I saw this but I wanted a click and dragger, not a scroll wheel. I'm working on a Mac with a magic mouse and I know how irritating it can be to scroll through stuff like this with the shitty magic mouse. [editline]21st May 2014[/editline] I also need accuracy over amount of numbers to scroll through, which the click and drag gives me. [editline]21st May 2014[/editline] [url]http://jsfiddle.net/8mDFc/[/url]
Sorry, you need to Log In to post a reply to this thread.