• Web Dev Questions That Don't Need Their Own Thread v4
    5,001 replies, posted
A 3 column setup - one line with text. For some reason I'm stupid and forgot how to center the middle object.
[QUOTE=Killervalon;39967445]A 3 column setup - one line with text. For some reason I'm stupid and forgot how to center the middle object.[/QUOTE] what? what I do is if the max width is fixed, just get the 3 and make it display:inline-block and vertical-align:top; (make sure the width of the three are equal and fits the container around it.
Hello everyone. I just finished HTML/CSS course on Codeacademy.com and I would like to test my..knowledge What would be the best way to do this?
Hey guys. Regarding javascripts, I include jQuery in my header so it's included on every page. But I also include a lightbox plugin that requires jQuery. Should I only include the lightbox script when I'm displaying images, or include after jQuery inside the header? Thanks.
[QUOTE=Sentinel010;39971053]Hello everyone. I just finished HTML/CSS course on Codeacademy.com and I would like to test my..knowledge What would be the best way to do this?[/QUOTE] either make a fake website or make a website for yourself.
[QUOTE=Drak_Thing;39972214]Hey guys. Regarding javascripts, I include jQuery in my header so it's included on every page. But I also include a lightbox plugin that requires jQuery. Should I only include the lightbox script when I'm displaying images, or include after jQuery inside the header? Thanks.[/QUOTE] With things like lightboxes that might be used anywhere on the site I stick it in the header. The browser will cache it so it only gets downloaded once anyways, and then you don't have to worry about whether or not it is included on any given page.
Unlikely anybody will know the answer to this but - does anyone know how to get the YouTube iFrame embed to use the same system on small screen mobiles that it does on tablets? I'd like the video to play on the screen rather than expanding into the screen like usual. Granted it's not very usable but it is the requirement I have been given. Also, can anybody point me in the direct of an up to date, best practice tutorial for PHP server-side validation?
Found out I'll learn ASP instead of php or ruby because of some stuff Microsoft. What do think about ASP, good good, good or bad?
[QUOTE=jung3o;39972571]either make a fake website or make a website for yourself.[/QUOTE] Thanks --- I'm having this problem, I created a button of some sort in css but the text is not aligned, how do I align it to be in the center? Here's the screenshot [IMG]http://i.imgur.com/BTFD6Hy.png[/IMG]
[QUOTE=Sentinel010;39979651]I'm having this problem, I created a button of some sort in css but the text is not aligned, how do I align it to be in the center? Here's the screenshot[/QUOTE] [CODE].button { text-align: center; line-height: <same height as the button itself>; }[/CODE]
[QUOTE=asantos3;39979535]Found out I'll learn ASP instead of php or ruby because of some stuff Microsoft. What do think about ASP, good good, good or bad?[/QUOTE] Its ok. Its just a lot harder to find cheap windows servers.
[QUOTE=SkyCommander;39979707][CODE].button { text-align: center; line-height: <same height as the button itself>; }[/CODE][/QUOTE] Thanks
[QUOTE=Sentinel010;39979651]Thanks --- I'm having this problem, I created a button of some sort in css but the text is not aligned, how do I align it to be in the center? Here's the screenshot [IMG]http://i.imgur.com/BTFD6Hy.png[/IMG][/QUOTE] It'd probably be much easier to use padding instead
[QUOTE=Sentinel010;39979651]Thanks --- I'm having this problem, I created a button of some sort in css but the text is not aligned, how do I align it to be in the center? Here's the screenshot [IMG]http://i.imgur.com/BTFD6Hy.png[/IMG][/QUOTE] I'd use padding instead of height/width, but if you have to use height/width: Set the line-height to the same as height, and text-align: center;
What's the advantage of padding?
[QUOTE=Sentinel010;39980638]What's the advantage of padding?[/QUOTE] the Button will be more fluid. You don't have to adjust the width of the button everytime you make a button. And it's a good way to practice because it's really dumb to use width when having a lot of buttons with different widths
[QUOTE=jung3o;39980688]the Button will be more fluid. You don't have to adjust the width of the button everytime you make a button. And it's a good way to practice because it's really dumb to use width when having a lot of buttons with different widths[/QUOTE] I see how would I position the "link" in the center when I use the padding? Here's that bit of the code [code] div{ height:50px; width:50px; border-color:#6495ED; background-color:#BCD2EE; padding:50px; } div { border-radius:75px; } [/code]
[QUOTE=Sentinel010;39980722]I see how would I position the "link" in the center when I use the padding? Here's that bit of the code -code that makes no sense-[/QUOTE] I'm not sure what you're trying to achieve, but I think this might help [URL]http://jsfiddle.net/ud592/1/[/URL]
Thanks Killervalon!
So I'm using PHP PDO for sqlite and I'm wondering what I can do to 1) get the content of a row. 2) modify contents of that row. Here's my structure. "CREATE TABLE UsersTable (steamID64 INTEGER PRIMARY KEY, steamName TEXT, privilege INTEGER, item_prefs TEXT, user_prefs TEXT)" and I insert 76561198032393626 *kirby677 10 None None 76561198064470517 dyr -1 None None What request would I do to load only the information in the row with "76561198064470517" as the ID? I've searched but all I can seem to come across are tutorials for autoincrementing primary key until you find it. I'm pretty sure there has to be a "DATABASE -> TABLE -> LOAD ROW WITH $THIS ID" function built in somewhere... And then I want to overwrite data, my database doesn't accept new input if some of the values in the row are set, I want to move around this behavior.
[code] SELECT * FROM UsersTable WHERE steamID64 = 76561198064470517 [/code] Since it is the primary key, it's already an index so you don't have to worry about that.
And for the last part of your post, [I]And then I want to overwrite data, my database doesn't accept new input if some of the values in the row are set, I want to move around this behavior. [/I], you need to use UPDATE. By example, UPDATE `tablename` SET `rowname`= 'newcharacter' ... WHERE steamID64 = 76561198064470517
Whats the best free wysiwyg html editor? I just need to spit out a few simple pages that don't look like absolute ass.
[QUOTE=Birdman101;39993067]Whats the best free wysiwyg html editor? I just need to spit out a few simple pages that don't look like absolute ass.[/QUOTE] If you want to make something in this area, do not use wysiwyg editors. You code with your editor and you can view the result in the browser. Code editor? Sublime Text 2. Need to change something in your html, css and javascript but want to know what it will be like? Check out Chrome Developer Tools.
[QUOTE=Vietnow;39980163]It'd probably be much easier to use padding instead[/QUOTE] [QUOTE=jung3o;39980688]the Button will be more fluid. You don't have to adjust the width of the button everytime you make a button. And it's a good way to practice because it's really dumb to use width when having a lot of buttons with different widths[/QUOTE] While I totally agree with you on this, my answer did solve Sentinel010's immediate problem, no? I don't see how you can disagree with that.
[QUOTE=SkyCommander;39993702]While I totally agree with you on this, my answer did solve Sentinel010's immediate problem, no? I don't see how you can disagree with that.[/QUOTE] This isn't stack overflow. It also to inform new users on better ways and stop them from doing temporary shortcuts that won't last you forever. You need to get rid of these kind of practices before it becomes something you use everyday. it's not productive AT ALL.
PHP Question.. I'm pretty new to PHP/Server-side scripting but I think I am doing pretty well so far. I've created a program that accesses data on a database using a query-string to create pages. Each one of these pages has an individual form on, which I would like to validate server-side. The one bit I do not understand, is how to communicate from my Validator class PHP file (validator.php) back to my PHP document? Essentially this -> Form Submits Goes to submit.php submit.php runs validator.php functions, returns errors Errors output on forms.php? This is without AJAX as well.
[QUOTE=asantos3;39993540]If you want to make something in this area, do not use wysiwyg editors. You code with your editor and you can view the result in the browser. Code editor? Sublime Text 2. Need to change something in your html, css and javascript but want to know what it will be like? Check out Chrome Developer Tools.[/QUOTE] Come to think of it, when ever someone has asked me editor I use I always say Sublime. But you just made me realize that I probably use Chrome Developer Tools just as much when it comes to HTML and CSS.
[QUOTE=Shadow801;39998504]PHP Question.. I'm pretty new to PHP/Server-side scripting but I think I am doing pretty well so far. I've created a program that accesses data on a database using a query-string to create pages. Each one of these pages has an individual form on, which I would like to validate server-side. The one bit I do not understand, is how to communicate from my Validator class PHP file (validator.php) back to my PHP document? Essentially this -> Form Submits Goes to submit.php submit.php runs validator.php functions, returns errors Errors output on forms.php? This is without AJAX as well.[/QUOTE] If you're using include() or require() you can access any variables you created in validation.php directly in submit.php
Alright so I've started learning html5 and I'm seeing a bunch of retarded tags that (from what I've seen) nobody uses, such as header, nav, footer, aside. Are they basically div's with fancy names?
Sorry, you need to Log In to post a reply to this thread.