• Questions That Don't Need Their Own Thread v3
    4,068 replies, posted
  • Should I need users that register on my site to agree with a license agreement? If yes, why exactly?
  • Avatar of xmariusx
  • Why won't this work to make a sticky footer? [code]<body> <div id="content"> Content of the site </div> <div id="footer"> (c)Owner </div> </body>[/code] [code]#content { height:100%; } #footer { height:100px; margin-top:-100px; }[/code]
  • [QUOTE=xmariusx;34462756]Why won't this work to make a sticky footer? <body> <div id="content"> Content of the site </div> <div id="footer"> (c)Owner </div> </body> #content { height:100%; } #footer { height:100px; margin-top:-100px; }[/QUOTE] Don't you mean something like [CODE] position: fixed; bottom: 0; [/CODE] ? PS. Use [ CODE ] tags
  • Avatar of xmariusx
  • [QUOTE=Darkwater124;34462794]Don't you mean something like [CODE] position: fixed; bottom: 0; [/CODE] ? PS. Use [ CODE ] tags[/QUOTE] No, I don't want it to be at the bottom of the screen all the time. Only when You have scrolled to the bottom of the site
  • Avatar of mobrockers2
  • [QUOTE=xmariusx;34462756]Why won't this work to make a sticky footer? [code]<body> <div id="content"> Content of the site </div> <div id="footer"> (c)Owner </div> </body>[/code] [code]#content { height:100%; } #footer { height:100px; margin-top:-100px; }[/code][/QUOTE] [url]http://ryanfait.com/sticky-footer/[/url]
  • Avatar of xmariusx
  • [QUOTE=mobrockers2;34463155][url]http://ryanfait.com/sticky-footer/[/url][/QUOTE] That doesn't answer my question?
  • Avatar of zzlawlzz
  • [QUOTE=Goz3rr;34463668]What would be the best webhost? I also need 2 domains[/QUOTE] what are you planning on using it for? How much traffic are you expecting?
  • Avatar of Miljaker
  • [QUOTE=xmariusx;34462832]No, I don't want it to be at the bottom of the screen all the time. Only when You have scrolled to the bottom of the site[/QUOTE] [code] position:absolute; bottom:0; [/code] ?
  • Avatar of xmariusx
  • [QUOTE=Miljaker;34467066][code] position:absolute; bottom:0; [/code] ?[/QUOTE] I have no idea why, but that would be the same as fixed position, just with a width that is as small as possible O.o
  • Avatar of kragmars102
  • [code] <script> $(documemt).ready(function() { if($(document).height() > $(window).height()) { $('.footer').addClass('someclass'); } }); </script> <style> .someclass{ position: fixed; top: 100%; height: 100px; margin-top: -100px; } </style> [/code] If you're website's height is longer then your screen's height then it add's a class of [b].someclass[/b]. Else if your website does not require scrolling it simply doesn't add the class and use's your default footer's style.
  • Avatar of barttool
  • so, I'm making this page as usual, checking how they look in different browsers and Safari is fucking up with the line height of text how it looks in all browsers: [IMG]http://dl.dropbox.com/u/25318683/heightnormal.JPG[/IMG] Safari: [IMG]http://dl.dropbox.com/u/25318683/heightsafari.JPG[/IMG] The code is really simple [CODE]p { font-family:NobileRegular, Arial, Helvetica, sans-serif; font-size:12px; color:#333; line-height:normal; text-align:justify; }[/CODE] any clues on why is this happening?
  • Avatar of swift and shift
  • just a stab in the dark here but line-height's normal value is probably different in safari. you should explicitly set that shit
  • Avatar of barttool
  • [QUOTE=swift and shift;34473041]just a stab in the dark here but line-height's normal value is probably different in safari. you should explicitly set that shit[/QUOTE] yeah, but that'd mean adding more values to other elements in the page and all that crap, I figured that safari doesn't recognize "normal" value, but is there an equivalent value and if so, is there a way to apply it just to safari?
  • Avatar of commander204
  • I suggest using a Reset filesheet, it should remove inconsistencies between browsers ( At least to an extent )
  • [QUOTE=zzlawlzz;34466738]what are you planning on using it for? How much traffic are you expecting?[/QUOTE] Right now not too much, say ~15GB/month with file hosting etc. It would be nice if i was able to upgrade that easily in the future.
  • Avatar of barttool
  • [QUOTE=commander204;34473546]I suggest using a Reset filesheet, it should remove inconsistencies between browsers ( At least to an extent )[/QUOTE] I do have a reset on the stylesheet.
  • Avatar of StinkyJoe
  • [QUOTE=barttool;34473702]I do have a reset on the stylesheet.[/QUOTE] Can we see it?
  • Avatar of barttool
  • I'm using this reset [url]http://meyerweb.com/eric/tools/css/reset/[/url] Eitherway, I found a solution to the issue already.
  • Avatar of jaybuz
  • I prefer normalize.css. It deals with a lot of browser bugs and inconsistances. [url]https://raw.github.com/necolas/normalize.css/master/normalize.css[/url] You can just remove the stuff you don't need like the HTML5 stuff.
  • Avatar of xmariusx
  • [QUOTE=kragmars102;34471618][code] <script> $(documemt).ready(function() { if($(document).height() > $(window).height()) { $('.footer').addClass('someclass'); } }); </script> <style> .someclass{ position: fixed; top: 100%; height: 100px; margin-top: -100px; } </style> [/code] If you're website's height is longer then your screen's height then it add's a class of [b].someclass[/b]. Else if your website does not require scrolling it simply doesn't add the class and use's your default footer's style.[/QUOTE] Sorry, but if that was a replay to me I didn't quit understand it. I haven't used javascript before, if that's what you where using. but is it possible to set a rule only if the browser window got a scroll bar, or only if it is missing a scroll bar?
  • Avatar of ardosos
  • So, I have this: [code] <img id = "myimage" > <script type = "text/javascript"> var nowTime = new Date().getHours(); if (nowTime <19) { document.getElementById("myimage").src="http://dl.dropbox.com/u/50641292/dayground.png"; } else { document.getElementById("myimage").src="http://dl.dropbox.com/u/50641292/nightground.png"; } </script> [/code] And it works as far as I can tell. But, is there any way for the browser to display it as an image, so I can reference it in a style sheet and have it display the time-sensitive image?
  • Avatar of jptalbert
  • I started HTML recently and I know a good amount of it but what would you guys say is the next step? I'm thinking about things like making drop-down boxes and nicer looking headers and things like that. Is there any particular language anyone could suggest?
  • Avatar of jaybuz
  • [QUOTE=Ardosos;34479032]So, I have this: [code] <img id = "myimage" > <script type = "text/javascript"> var nowTime = new Date().getHours(); if (nowTime <19) { document.getElementById("myimage").src="http://dl.dropbox.com/u/50641292/dayground.png"; } else { document.getElementById("myimage").src="http://dl.dropbox.com/u/50641292/nightground.png"; } </script> [/code] And it works as far as I can tell. But, is there any way for the browser to display it as an image, so I can reference it in a style sheet and have it display the time-sensitive image?[/QUOTE] Use two css classes called night and day with a stretched image background. make the div position fixed and full viewport width and height.
  • Avatar of jaybuz
  • There's a javascript version of Firebug and there's this: [url]http://debugbar.com[/url] [editline]31st January 2012[/editline] What's the difference between an Array and Object in JS/SON? I'm not sure when to use an Array instead of an Object.
  • [QUOTE=jaybuz;34480246]There's a javascript version of Firebug and there's this: [url]http://debugbar.com[/url] [editline]31st January 2012[/editline] What's the difference between an Array and Object in JS/SON? I'm not sure when to use an Array instead of an Object.[/QUOTE] Array is pretty much the same as an object, for me it's more the way how you call them. (array['key'] or object.key)
  • Avatar of jaybuz
  • [QUOTE=Darkwater124;34481273]Array is pretty much the same as an object, for me it's more the way how you call them. (array['key'] or object.key)[/QUOTE] But you can also do: object['key']