Web Dev Questions That Don't Need Their Own Thread v4
5,001 replies, posted
I'm trying to make a HTML page and the padding isn't working as intended.
[img]http://i.imgur.com/5Dd8npB.png[/img]
I have the padding set to 0px but there is still padding on the top and bottom of the containers.
CSS: [url]http://pastebin.com/weKHTHCC[/url]
HTML: [url]http://pastebin.com/StCWQbNb[/url]
[QUOTE=Pat.Lithium;41391505]I'm trying to make a HTML page and the padding isn't working as intended.
[img]http://i.imgur.com/5Dd8npB.png[/img]
I have the padding set to 0px but there is still padding on the top and bottom of the containers.
CSS: [url]http://pastebin.com/weKHTHCC[/url]
HTML: [url]http://pastebin.com/StCWQbNb[/url][/QUOTE]
Can you please check if thats what you want ?
[url]http://jsfiddle.net/7JdhL/1/[/url]
I know a destitute amount of web dev stuff (aka basic html) and would like to get in contact with someone who could make me a simple but elegant looking website for my new title link [I]as a favor[/I]. If you don't mind a 1-2 hour project, contact me via pm for more details.
[QUOTE=RusselG;41376459]I assume it's just load-balancing in cases, sending requests to different servers. With databases, it would be like replication slaves or similar. I'm not really sure.[/QUOTE]
[QUOTE=andersonmat;41377659]It really depends. Often you put multiple servers behind a load balancer (either software or hardware) and schedule how you want it to distribute load.
As far as databases are concerned, it depends upon what you are using. If you use something like Redis, the only thing that it supports is master-slave replication, if you use MySQL, it supports clustering and replication. Many larger object stores (Riak, elasticsearch) do automatic clustering and use stuff like paxos to distribute requests and data.[/QUOTE]
Would this load-balancing hardware be my static IP address I use with my domain register?
Programming wise, would the code below properly function across most browsers? Or is this approach documented anywhere I can review?
[code]
<!doctype html>
<html>
<head>
<style>span{display:block;}</style>
<script type="text/javascript">
var system={
examples:{
hoverRed:function(event){
if(system.isEvent(event)){
event.target.style.color='black';
if(event.type==='mouseover'){
event.target.style.color='red';
}
}
}
},
isEvent:function(event){
if(event){
if(typeof event.type==='string'){
if(typeof event.target==='object'){
if(typeof event.target.getAttribute('node')==='string'){
if(system.examples[event.target.getAttribute('node')]){
return true;
}
}
}
}
}
return false;
},
node:function(event){
if(system.isEvent(event)){
system.examples[event.target.getAttribute('node')](event);
}
}
};
window.onmouseout=system.node;
window.onmouseover=system.node;
</script>
</head>
<body>
<span node="hoverRed">objectTitle</span>
<span node="hoverRed">objectTitle</span>
<span node="hoverRed">objectTitle</span>
</body>
</html>
[/code]
[QUOTE=Pat.Lithium;41391505]I'm trying to make a HTML page and the padding isn't working as intended.
[img]http://i.imgur.com/5Dd8npB.png[/img]
I have the padding set to 0px but there is still padding on the top and bottom of the containers.
CSS: [url]http://pastebin.com/weKHTHCC[/url]
HTML: [url]http://pastebin.com/StCWQbNb[/url][/QUOTE]
Set the margin to 0 as well
edit: Nevermind, it is set
[QUOTE=Pat.Lithium;41391505]I'm trying to make a HTML page and the padding isn't working as intended.
I have the padding set to 0px but there is still padding on the top and bottom of the containers.[/QUOTE]
You have a height set for the parent divider, remove that and it should work as intended.
[sql]
SELECT a.idConsulta, a.dataConsulta,
(select a.nome from tbl_funcionarios a, tbl_veterinarios b, tbl_consultas c where c.veterinario=b.idFuncionario and b.idFuncionario=c.idFuncionario) as NomeVeterinario,
(select a.nome from tbl_funcionarios a, tbl_tecVeterinaria b, tbl_consultas c where c.tecnico=b.idFuncionario and b.idFuncionario=c.idFuncionario) as NomeTecnico,
c.nome AS NomeAnimal, c.foto AS UrlFoto
FROM tbl_consultas a, tbl_funcionarios b, tbl_animais c
WHERE a.animal=c.idAnimal
[/sql]
This is how subqueries work, right?
What's the best way to handle a lot of jquery ui sliders and buttons? I have ~70 button/slider pairs that are shown in groups of 1-10 with the rest in hidden divs.
Is this a good way to handle it or should I be creating/removing them as needed?
I just finished the HTML and CSS lessons on Codecademy and I'm working on a website and I have a few questions.
When people have menu bars and that kind of stuff on their websites, do they make those in photoshop or are they created using CSS/another language?
What are some free web hosting services? All the ones I've found force you to use their templates.
What are some good references sites? I can't remember all of the selectors and different attributes and that kind of stuff. I've been to W3Schools and it didn't really help me.
[QUOTE=wlitsots;41400670]I just finished the HTML and CSS lessons on Codecademy and I'm working on a website and I have a few questions.
When people have menu bars and that kind of stuff on their websites, do they make those in photoshop or are they created using CSS/another language?
What are some free web hosting services? All the ones I've found force you to use their templates.
What are some good references sites? I can't remember all of the selectors and different attributes and that kind of stuff. I've been to W3Schools and it didn't really help me.[/QUOTE]
You can make a menu bar in photoshop first, and then make it in CSS.
(Though, I prefer skipping the photoshop part)
I had a group project in school, and we used [URL="http://www.000webhost.com/"]000webhost [/URL]
The last part I can't say anything to without being damned to hell.
I have a webserver which supports ftp, php etc, and I'm looking for a way to have a system where a program I'm writing can send data to the site, which will then be displayed as plain text on a page, but I know little to nothing about the php side of web development.
Can anyone give me a few pointers on how I should start looking at this?
EDIT: Thinking about it, it's probably easier to use FTP and a text file.
Any way to disable the back/forward buttons on the mouse from working?
We want to use them in Rust but they change the page :S
[QUOTE=garry;41408628]Any way to disable the back/forward buttons on the mouse from working?
We want to use them in Rust but they change the page :S[/QUOTE]
You make your game a standalone executable, and don't rape browsers with Unity.
[highlight](User was permabanned for this post ("gj" - garry))[/highlight]
[QUOTE=garry;41408628]Any way to disable the back/forward buttons on the mouse from working?
We want to use them in Rust but they change the page :S[/QUOTE]
I don't think they are exposed to JavaScript like the standard mouse buttons, if it were you could use event.preventDefault();.
That's kinda what I thought, thanks for confirming
[QUOTE=garry;41408956]That's kinda what I thought, thanks for confirming[/QUOTE]
You can override the history on the browser tho and replace it with "#" so when people press forward or back nothing will happen.
Its a bit of a hack, but works in most browsers.
Somebody wrote out the solution here: [URL]http://stackoverflow.com/questions/17542904/how-to-restrict-browser-back-functionality-caused-by-mouse-side-buttons[/URL]
[editline]11th July 2013[/editline]
[QUOTE=CBastard;41408821]I don't think they are exposed to JavaScript like the standard mouse buttons, if it were you could use event.preventDefault();.[/QUOTE]
They are exposed, but event.preventDefault() doesn't work on it. (at least not in chrome)
[QUOTE=ColdFusion;41409193]You can override the history on the browser tho and replace it with "#" so when people press forward or back nothing will happen.[/QUOTE]
Overriding a user's history may ruin some user's experiences. If I want to play a browser game I will dedicate a new window, or tab, to it. If user's are running into history problems then that is on their end.
Prompt a message, if any history is detected with JavaScript, that recommends the user to play in a new window, or tab. Unity should offer browser these solutions/overrides.
I am considering as an early bug reporter to POST via Ajax a list of issues and reports, if any. These would use cookies and other small identifying bits, but would be intended for automatic bug reporting.
How common does this happen or is it common to find websites submitting reports to itself?
Why not make it a standalone executable? I don't understand the appeal of using a browser to play 3d games. There is no real benefit for doing so, you still have to download all the resources and its not very optimized to begin with.
[highlight](User was permabanned for this post ("you must have missed the bit where the guy got banned for posting that" - garry))[/highlight]
[QUOTE=Dorkslayz;41379301]Yeah. You need to point the IP to a VPS/Dedicated Server/whatever and then you can do this (courtesy of [url=http://blog.softlayer.com/2011/iptables-tips-and-tricks-port-redirection/]softlayer blog[/url]) to redirect traffic that goes to a certain port to another IP address.
So you for, I guess you could do it like this.
[code]
iptables -t nat -A PREROUTING -p tcp -d (VPS/Dedicated Server IP) --dport 27015 -j DNAT --to-destination (Game server IP):27015
[/code]
Haven't tested this, but in theory it should work.[/QUOTE]
While this is a cool use of iptables it's a terrible idea given the additional latency and hops required (Not to mention the bandwidth wasted).
For example: Say I'm a user on the US east coast that wants to connect to your server. I put in the domain which connects me to your european VPS which then tunnels traffic from your west coast game server. It's going to perform like shit because my ISP doesn't have great peering capability with european ISPs and my traffic still has to make a trip back across the US.
[QUOTE=Epiclulz762;41409442]Overriding a user's history may ruin some user's experiences. If I want to play a browser game I will dedicate a new window, or tab, to it. If user's are running into history problems then that is on their end.
Prompt a message, if any history is detected with JavaScript, that recommends the user to play in a new window, or tab. Unity should offer browser these solutions/overrides.
I am considering as an early bug reporter to POST via Ajax a list of issues and reports, if any. These would use cookies and other small identifying bits, but would be intended for automatic bug reporting.
How common does this happen or is it common to find websites submitting reports to itself?[/QUOTE]
Extending upon my requests, is it possible to have nothing but an .htaccess file that redirects every request to a file in another directory? An example below:
[QUOTE]
[url]http://my-site.com/forumPage[/url]
[url]http://my-site.com/staticPage[/url]
[url]http://my-site.com/userPage[/url]
[/QUOTE]
[QUOTE]
C:/www/processor.php
C:/www/html/.htaccess
[/QUOTE]
With the above, would it be possible to have the .htaccess file send each of the requests to the 'processor.php' in the parent folder?
-snip-
I'm going to design an e-commerce website soon (decoration items) and I would like to know some alternatives for complete solutions.
While I do know how to build one, I prefer to not try to re-invent the wheel and make a possible big mistake. So far I have checked online and found [URL="http://spreecommerce.com/"]Spree[/URL] which is run with RoR so that's a bonus since I like ruby.
Did anyone here ever use it? Or similar things? It has to be completely customizable and a way to automate order handling after it's done.
[QUOTE=nehkz;41417269]What the flying fuck am I doing wrong here? I'm trying to install [url="http://anchorcms.com"]anchorcms[/url] and done everything it says in the docs, but when I try and navigate to where the install script is located it gives me [url="nehkz.me/img/i/14e59c17690b4ff1e38d4e9ee069710d.png"]this[/url]. I've chmodded the folder and it's contents. It doesn't make any sense.[/QUOTE]
What did you chmod it to?
-snip-
-snip nvm got it already-
[QUOTE=Qaus;41392326]I know a destitute amount of web dev stuff (aka basic html) and would like to get in contact with someone who could make me a simple but elegant looking website for my new title link [I]as a favor[/I]. If you don't mind a 1-2 hour project, contact me via pm for more details.[/QUOTE]
Just wanna let y'all know the title cleared and it shows about 80% of my knowledge of html.
I'm attempting to get animations on mobiles working, however, I'm unable to get it to work smoothly. Any recommendations? I've tried using both JQuery and CSS3
[QUOTE=andersonmat;41393770]You have a height set for the parent divider, remove that and it should work as intended.[/QUOTE]
That doesn't fix it that just changes the height to adjust to the content within in. I want it to have the height I set and have the text align correctly to it.
Is it possible to make menu like this:
[img]http://i411.photobucket.com/albums/pp196/arleitiss/Untitled-1fw_zps408374a9.png[/img]
So that it's not a box-link bu rather elevated like that?
and when user hovers over one of those, it kind of rolls out/extends.
is that even possible? And user doesnt need to hover over actual menu item text, but just a tab itself.
My latest question deals with co-location; where I am currently, I am being offered $60/month for 1U (to possible 2/4U) rack space. This does not include internet service but it does include power and lock/access.
I cannot find any local places to quote, except this one mentioned above, so does anyone here have a range of what they are offered or what you pay?
Sorry, you need to Log In to post a reply to this thread.