• Web Development Questions That Don't Need Their Own Thread v2
    3,079 replies, posted
[QUOTE=Jimbomcb;30836798]One large jpg. Is it simply just a case of drawing it each time I clear the screen for the next frame or am I an idiot.[/QUOTE] You could use two canvas elements, one for the background and one for the foreground, then the foreground canvas would be the only one to update saving you having to draw a large amount of image data every frame. You could also just use a normal image element.
Wondering if anybody can help me with this, I find it easier to explain with these two images. What is happening: [IMG]http://i.imgur.com/Ralgd.jpg[/IMG] What I want to happen: [IMG]http://i.imgur.com/yLzL3.jpg[/IMG] How can I achieve this? Sorry for the shitty image quality.
[QUOTE=Misael;30838170]Wondering if anybody can help me with this, I find it easier to explain with these two images. What is happening: [IMG]http://i.imgur.com/Ralgd.jpg[/IMG] What I want to happen: [IMG]http://i.imgur.com/yLzL3.jpg[/IMG] How can I achieve this? Sorry for the shitty image quality.[/QUOTE] Showing us your code might help.
[QUOTE=LiamBrown;30836914]You could use two canvas elements, one for the background and one for the foreground, then the foreground canvas would be the only one to update saving you having to draw a large amount of image data every frame. You could also just use a normal image element.[/QUOTE] Thanks. [url]http://jimbomcb.net/spec/2/[/url] What's up with the crappy performance in chrome, full screen at 1920x1200 it's getting about 30fps, compared to full 60 in firefox?
[QUOTE=Jelly;30838283]Showing us your code might help.[/QUOTE] [code]<div class="online"> <p>User 1</p> <p>User 2</p> <p>User 3</p> <p>User 4</p> <p>User 5</p> <p>User 6</p> <p>User 7</p> <p>User 8</p> <p>User 9</p> <p>User 10</p> <p>User 11</p> <p>User 12</p> <p>User 13</p> </div><!--END ONLINE-->[/code] css [code] .online { position: fixed; top: 2em; left: 42em; [/code] This will later on have to work with an undefined amount of "Users" I just need them that after a certain height (ex. 230px) for it to keep going on the right.
[QUOTE=Misael;30838524][code]<div class="online"> <p>User 1</p> <p>User 2</p> <p>User 3</p> <p>User 4</p> <p>User 5</p> <p>User 6</p> <p>User 7</p> <p>User 8</p> <p>User 9</p> <p>User 10</p> <p>User 11</p> <p>User 12</p> <p>User 13</p> </div><!--END ONLINE-->[/code] css [code] .online { position: fixed; top: 2em; left: 42em; [/code] This will later on have to work with an undefined amount of "Users" I just need them that after a certain height (ex. 230px) for it to keep going on the right.[/QUOTE] first and foremost, you should be using a list elements, not paragraph elements [code] <ul id="online_users"> <li>User 1</li> <li>User 2</li> <li>User 3</li> <li>User 4</li> </ul> [/code]
I agree, I have fixed that and continued to play with the css stylesheet but I can't seem to find a way to solve this problem. Any help will be greatly appreciated.
[QUOTE=Misael;30843691]I agree, I have fixed that and continued to play with the css stylesheet but I can't seem to find a way to solve this problem. Any help will be greatly appreciated.[/QUOTE] You want something like this? [url]http://csswizardry.com/2010/02/mutiple-column-lists-using-one-ul[/url]
With HTML5 does the video tag work in the same kind of way as the canvas? So the code inside it only gets used if the browser doesnt support HTML5? In other words, if I wanted to have a video that plays using HTML5 but I wanted to have a fallback to flash would I do it like(in pseudo code): [code] <video tag> ///////// flash code here </video tag>[/code]
Why does firefox display elements in a different way than chrome? [img]http://gabrielecirulli.com/p/20110702-164103.png[/img] There's no way to make the two look the same. If I add 1px to the height the chrome one will break, if I subtract the firefox one will break. This happens every time. What should I do? [editline]2nd July 2011[/editline] [html]<div id="newsugg"> <form action="submitnew.php" method="post" id="suggform"> <input type="text" id="suggin" placeholder="Suggest something (be appropriate!)"> <input type="submit" id="suggsub" value="Submit"> </form> </div>[/html] [css]/*input form*/ #newsugg { width: 700px; margin: 0 auto; margin-top: 15px; height: auto; } #suggform * { padding: 0; margin: 0; border: none; } #suggin { border-radius: 2px 0px 0px 2px; width: 588px; border: 1px solid #D8D8D8; border-right: none; font-family: 'Varela', tahoma, verdana, geneva, sans-serif; padding: 0 5px; color: #555; height: 2em; } #suggsub { border-radius: 0px 2px 2px 0px; width: 100px; margin-left: -4px; border: 1px solid #D8D8D8; background-color: #F0F0F0; color: #999; height: 28px; font-family: 'Varela', tahoma, verdana, geneva, sans-serif; } #suggsub:hover { background-color: whiteSmoke; color: darkGray; } #suggsub:active { background-color: #F0F0F0; color: #999; }[/css]
[QUOTE=Jimbomcb;30838484]Thanks. [url]http://jimbomcb.net/spec/2/[/url] What's up with the crappy performance in chrome, full screen at 1920x1200 it's getting about 30fps, compared to full 60 in firefox?[/QUOTE] It's because Chrome has GPU acceleration for canvas turned off by default. [editline]2nd July 2011[/editline] [QUOTE=Richy19;30847473]With HTML5 does the video tag work in the same kind of way as the canvas? So the code inside it only gets used if the browser doesnt support HTML5? In other words, if I wanted to have a video that plays using HTML5 but I wanted to have a fallback to flash would I do it like(in pseudo code): [code] <video tag> ///////// flash code here </video tag>[/code][/QUOTE] Yes that's how it works. Here is an example: [url]https://developer.mozilla.org/En/Using_audio_and_video_in_Firefox[/url] (scroll down to fallback options).
[QUOTE=TeratybeS;30847613]Why does firefox display elements in a different way than chrome? [img]http://gabrielecirulli.com/p/20110702-164103.png[/img] There's no way to make the two look the same. If I add 1px to the height the chrome one will break, if I subtract the firefox one will break. This happens every time. What should I do? [editline]2nd July 2011[/editline]-code-[/QUOTE] Could you not just check what browser the user has and then apply different CSS according?
[QUOTE=Richy19;30847917]Could you not just check what browser the user has and then apply different CSS according?[/QUOTE] I wouldn't really like to do that, honestly.
[QUOTE=TeratybeS;30847943]I wouldn't really like to do that, honestly.[/QUOTE] Have you tried setting top and bottom padding to 0 and then line-height the same as height?
[QUOTE=Skorpy;30849452]Have you tried setting top and bottom padding to 0 and then line-height the same as height?[/QUOTE] Hmm, no, but I don't think that would work (not gonna try now since I went for another approach)
[QUOTE=TeratybeS;30849468]Hmm, no, but I don't think that would work (not gonna try now since I went for another approach)[/QUOTE] Try using line-height. [editline]2nd July 2011[/editline] And if that doesn't work try display: inline-block.
Firefox ignores line-height on submit buttons (and on <input type="button">, but not <button>), so all that will do is affect Chrome. Browsers don't handle this stuff well, I don't think there's actually a single standard behaviour over it.
[QUOTE=TheDecryptor;30862858]Firefox ignores line-height on submit buttons (and on <input type="button">, but not <button>), so all that will do is affect Chrome. Browsers don't handle this stuff well, I don't think there's actually a single standard behaviour over it.[/QUOTE] I guess it's onto Javascript hacks now? [html]<a href="#" onclick="$(this).parent('form').submit();return false;">Sumbit</a>[/html]
What is the best way to save forum post usernames? Should I save a user id and then when I'm retreving the posts get the username? Or should I save the username along with the post in the database? I guess the latest is fastest but have the least compibatility with other forum functions. But I want your opinions on this, like will it increase/decrease load times and what not. Implenting it is no problem, just want to make sure I go a safe and hopefully fast road.
[QUOTE=pdkm931;30878407]What is the best way to save forum post usernames? Should I save a user id and then when I'm retreving the posts get the username? Or should I save the username along with the post in the database? I guess the latest is fastest but have the least compibatility with other forum functions. But I want your opinions on this, like will it increase/decrease load times and what not. Implenting it is no problem, just want to make sure I go a safe and hopefully fast road.[/QUOTE] store the userid with the post
[QUOTE=pdkm931;30878407]What is the best way to save forum post usernames? Should I save a user id and then when I'm retreving the posts get the username? Or should I save the username along with the post in the database? I guess the latest is fastest but have the least compibatility with other forum functions. But I want your opinions on this, like will it increase/decrease load times and what not. Implenting it is no problem, just want to make sure I go a safe and hopefully fast road.[/QUOTE] id userid topicid and the post there are also extra things like mmddyyyy
anyone wanna tell me how stupid it would be to make a database table without a primary key?
[QUOTE=Ac!dL3ak;30881056]anyone wanna tell me how stupid it would be to make a database table without a primary key?[/QUOTE] Very, database algorithms like MyISAM get their speed from indexes, and without an index, you are sacrificing every speed boost that algorithm gives you.
[QUOTE=Erp;30879648]store the userid with the post[/QUOTE] Good. Just wanted to check to be 100% sure that it's the optimal thing todo. [QUOTE=zzlawlzz;30879709]id userid topicid and the post there are also extra things like mmddyyyy[/QUOTE] id, user_id, post(the content), time(CURRENT_TIMESTAMP), thread_id. Then I'll just have to build more on it as time goes on. [editline]4th July 2011[/editline] [QUOTE=deadeye5362;30881719]Very, database algorithms like MyISAM get their speed from indexes, and without an index, you are sacrificing every speed boost that algorithm gives you.[/QUOTE] And a good idea is using the id as a unique or? [editline]4th July 2011[/editline] Also, I can't get this to work. [php] Options +FollowSymlinks RewriteEngine on RewriteRule ^forum/([^/]+)/$ index.php?forum=$1 [NC] [/php]
Quick Question: If i buy a domain name from one website, but the hosting from another, is this do-able? Basically i want to reserve a site name but not pay the monthly fees yet because i've not got the content. I want to use lithium hosting but as far as i can see they don't do domain registering. Cheers
[QUOTE=Occlusion;30890704]Quick Question: If i buy a domain name from one website, but the hosting from another, is this do-able? Basically i want to reserve a site name but not pay the monthly fees yet because i've not got the content. I want to use lithium hosting but as far as i can see they don't do domain registering. Cheers[/QUOTE] Quick answer: Yes, it is possible.
I currently have this, but I wonder how I can keep this design, that is the text going over the box, and still have a button clickable under it. [url]http://super.brohost.net/[/url] Does anyone know a way?
One div above the others with no set background?
[QUOTE=Occlusion;30890704]Quick Question: If i buy a domain name from one website, but the hosting from another, is this do-able? Basically i want to reserve a site name but not pay the monthly fees yet because i've not got the content. I want to use lithium hosting but as far as i can see they don't do domain registering. Cheers[/QUOTE] Very possible and very easy
[QUOTE=pdkm931;30896932]One div above the others with no set background?[/QUOTE] Thanks! I feel stupid now... Also, I was wondering if the Color sheme is alright for now? Or is it bad?
Sorry, you need to Log In to post a reply to this thread.