• Web Dev Questions That Don't Need Their Own Thread v4
    5,001 replies, posted
[QUOTE=CBastard;40540010]You can't use dropbox as a PHP host. Don't use the <center> or <font> tags, use CSS. Don't just echo things from GET or POST, use strip_tags() or htmlentities().[/QUOTE] I don't have any other alternative to host it (Yes I know I can just load the file into browser but that's not the case) And since I'm still not good at html I preffer to use center and font as they are easier to me.
[QUOTE=B-Rabbit;40540151]I don't have any other alternative to host it (Yes I know I can just load the file into browser but that's not the case) And since I'm still not good at html I preffer to use center and font as they are easier to me.[/QUOTE] It's best not get into bad habits when you are just starting to learn. If you intention is to learn don't waste any time using things that have been bad practice for over a decade. To run PHP you need a webserver with PHP installed. For easy local development use something like XAMPP on your own computer and put the PHP files you want to run in the htdocs folder. There are plenty of guides on the web.
I'm confused. Are you allowed to [code]<a href="linkhere"><li>lol</li></a>[/code]
[QUOTE=Killervalon;40545130]I'm confused. Are you allowed to [code]<a href="linkhere"><li>lol</li></a>[/code][/QUOTE] Better have the a inside the li tags.
[QUOTE=gokiyono;40545175]Better have the a inside the li tags.[/QUOTE] depends, if he wants a navbar when the buttons are more like button than linked text, then the way he has it is fine
[QUOTE=pinecleandog;40545235]depends, if he wants a navbar when the buttons are more like button than linked text, then the way he has it is fine[/QUOTE] [CODE] margin:0px; display:block; width:100%; height:100%; [/CODE] For the a in the li? I suppose your way is easier and less painful.
[QUOTE=gokiyono;40545281][CODE] margin:0px; display:block; width:100%; height:100%; [/CODE] For the a in the li? I suppose your way is easier and less painful.[/QUOTE] here this is the kind of result I was talking about: [URL]http://jsfiddle.net/Sgx98/[/URL] of course you can change the text to change colour too.
[QUOTE=pinecleandog;40545351]here this is the kind of result I was talking about: [URL]http://jsfiddle.net/Sgx98/[/URL] of course you can change the text to change colour too.[/QUOTE] I just learned something new
[QUOTE=pinecleandog;40545351]here this is the kind of result I was talking about: [URL]http://jsfiddle.net/Sgx98/[/URL] of course you can change the text to change colour too.[/QUOTE] Yeah, that was the setup I was looking for. I was just running it through validator, and ofc the html5 one isn't complete - but it still said it was wrong. I was just curious to as if I was doing it wrong.
Yea I aint bothering much with html 5 until it is done
Having li inside a is wrong. Make the a into a display block or inline-block and mess around with a, but don't touch the li. (Makes sure there is no padding on li)
[QUOTE=jung3o;40546248]Having li inside a is wrong. Make the a into a display block or inline-block and mess around with a, but don't touch the li. (Makes sure there is no padding on li)[/QUOTE] Why if I may ask?
Because <a> is not a list element, so it has no place inside a list, where <li>This is not inside a list<li>, but <ul>this is inside a list</ul>
[QUOTE=xmariusx;40546350]Because <a> is not a list element, so it has no place inside a list, where <li>This is not inside a list<li>, but <ul>this is inside a list</ul>[/QUOTE] yeah but then users have to click on the text , clicking on the surrounding box would not do anything. It's fine either way
[QUOTE=pinecleandog;40546569]yeah but then users have to click on the text , clicking on the surrounding box would not do anything. It's fine either way[/QUOTE] Actually, you can resize the anchor to match the <li> size. Here's an example: [URL]http://jsfiddle.net/Sgx98/3/[/URL]
[url]http://jsfiddle.net/Sgx98/5/[/url] here's a better example imo. Worre, your's doesn't have a selection for top and bottom of text
[QUOTE=jung3o;40546936][url]http://jsfiddle.net/Sgx98/5/[/url] here's a better example imo. Worre, your's doesn't have a selection for top and bottom of text[/QUOTE] Yeah, forgot to remove <li> padding completely.
[QUOTE=jung3o;40546936][URL]http://jsfiddle.net/Sgx98/5/[/URL] here's a better example imo. Worre, your's doesn't have a selection for top and bottom of text[/QUOTE] Thanks.. Fixed it and now everything is correct (according to validator / Sir Timothy)
Linking to current folder? (To make sure you get clean links instead - and no, the http:// solution is kind of silly) [sp]I guess "/" kind of works, but it links to root of the domain / subdomain[/sp]
I'm interested in learning code started with java script and am I suppose fairly competent with it... any advice as far as things to avoid or steps to take to better myself in that way?
[QUOTE=Killervalon;40550901]Linking to current folder? (To make sure you get clean links instead - and no, the http:// solution is kind of silly) [sp]I guess "/" kind of works, but it links to root of the domain / subdomain[/sp][/QUOTE] I think either "." or "./" is direct link to current folder.
[QUOTE=id05245;40551113]I'm interested in learning code started with java script and am I suppose fairly competent with it... any advice as far as things to avoid or steps to take to better myself in that way?[/QUOTE] Leave Jquery till you are certain you know Js well. Practice Javascript by making simple image roll overs, slide shows, things that change css rules when you press a button; stuff like that, that will be always useful. Another thing you could try is making your own form validation.
What's the equivalent of <center> tag in CSS? I tried using [code] margin-left: auto; margin-right: auto; text-align:center;[/code] but they don't always work with images and audio players.
[QUOTE=B-Rabbit;40557350]What's the equivalent of <center> tag in CSS? I tried using [code] margin-left: auto; margin-right: auto; text-align:center;[/code] but they don't always work with images and audio players.[/QUOTE] Just the text-align should work. Could you create a jsfiddle?
[QUOTE=B-Rabbit;40557350]What's the equivalent of <center> tag in CSS? I tried using [code] margin-left: auto; margin-right: auto; text-align:center;[/code] but they don't always work with images and audio players.[/QUOTE] You'll have to apply display: block; to inline elements like images.
[QUOTE=B-Rabbit;40557350]What's the equivalent of <center> tag in CSS? I tried using [code] margin-left: auto; margin-right: auto; text-align:center;[/code] but they don't always work with images and audio players.[/QUOTE] also, you can shorten it to [code]margin: 0 auto;[/code]
To center a div you do the following: [code]#divelement { width: 1100px; /* static width */ margin: 0 auto; /* centered */ }[/code]
Remember kids [code]margin: top right bottom left[/code] [code]margin: top/bottom right/left[/code] Same goes for padding and other stuff that allows it. Then colors go from 0123456789abcdef (hex) Dark to light
So a guy in the Forum Changes thread in GD posted a script so you could edit the line at the top of the page. I can't get it to work. This is the script: [CODE] #header { border-bottom: 5px solid rgba(192, 0, 15, 0.82); box-shadow: 0 5px 32px rgba(0, 0, 0, 0.74); height: 90px; overflow: hidden; [/CODE] And this is how I'm trying to use it in Stylish: [CODE] @namespace url(http://www.w3.org/1999/xhtml); @-moz-document domain("facepunch.com") { #header { border-bottom: 5px solid rgba(192, 0, 15, 0.82); box-shadow: 0 5px 32px rgba(0, 0, 0, 0.74); height: 90px; overflow: hidden; } } [/CODE] Note: This most likely isn't what I want the line to look like, I'll probably edit it a bit. I just need to see what it looks like. [editline]7th May 2013[/editline] Ooh, code tags look nice :D [editline]7th May 2013[/editline] And if that css bit is shit, could anyone maybe tell me what to use in order to edit the height/color/etc. of the line?
Maybe the [url]http://www.w3.org/1999/xhtml[/url] needs to be inside quotes, like "facepunch.com" is.
Sorry, you need to Log In to post a reply to this thread.