code logs -> 2015 -> Fri, 09 Oct 2015< code.20151008.log - code.20151010.log >
--- Log opened Fri Oct 09 00:00:41 2015
00:08 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
00:08 mode/#code [+qo Vornicus Vornicus] by ChanServ
00:59 Derakon[AFK] is now known as Derakon
01:16 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has quit [[NS] Quit: ]
01:18 catadroid [catalyst@Nightstar-7auk2q.dab.02.net] has joined #code
02:15 Turaiel is now known as Turaiel[Offline]
02:30 Turaiel[Offline] is now known as Turaiel
03:02 Turaiel is now known as Turaiel[Offline]
03:15 Turaiel[Offline] is now known as Turaiel
03:36 Turaiel is now known as Turaiel[Offline]
03:37 Turaiel[Offline] is now known as Turaiel
04:30 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
04:36 Turaiel is now known as Turaiel[Offline]
04:54 Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
04:58 Derakon is now known as Derakon[AFK]
05:43 macdjord is now known as macdjord|slep
06:08
< Meatyhandbag>
hey, I probably sound like an idiot, but I can't get my header to centre in my body. I have the margin set to margin: 0 auto; as well as margin-left: auto; margin-right: auto;, and other variations, and it stills hangs onto the left wall of my web page.
06:08
< Meatyhandbag>
css
06:13 catadroid` [catalyst@Nightstar-50mtrq.dab.02.net] has joined #code
06:15 catadroid [catalyst@Nightstar-7auk2q.dab.02.net] has quit [Ping timeout: 121 seconds]
06:22
< [R]>
Did you set a block width?
06:23
< [R]>
http://learnlayout.com/margin-auto.html
06:23
< Meatyhandbag>
I have the image width set to 50%
06:24
< Meatyhandbag>
but I assumed the width of the body would be changing all the time
06:24
< [R]>
The margin declarations are on the img, correct?
06:25
< [R]>
http://arstechnica.com/security/2012/12/25-gpu-cluster-cracks-every-standard-win dows-password-in-6-hours/
06:25
< Meatyhandbag>
I tried putting the margin in both the img itself and the header the img is in
06:27
< [R]>
Whatever has the width restrictions should also have the margin auto.
06:27
< Meatyhandbag>
http://pastie.org/10469648
06:28
< Meatyhandbag>
and yeah, putting the margin in the img section doesn't change it
06:30
< [R]>
Is "header" a class or an id/name?
06:30
< Meatyhandbag>
header is a class
06:31
< Meatyhandbag>
<header></header>
06:34
< [R]>
You just told me two entirely different things
06:34 * [R] will proceed as if you said "element"
06:35
< Meatyhandbag>
is still new to coding, hasn't memorised terminology
06:36
< [R]>
HTML*
06:37
< [R]>
Okay so, you have to have the margin auto on the container element (<header>), additionally you will need to give that element a specified width, as such you'll probably want "text-align: center;" on the container object to keep the image centered.
06:38
< [R]>
Also, I find throwing in "border: 1px solid black" or such into CSS helps with debugging positioning and size issues.
06:42
< Meatyhandbag>
http://pastie.org/10469665
06:43
< Meatyhandbag>
Ok, the img is pushed inward, but it really isn't "centred", and the border I added seems to be off to the left slightly, cutting through the img
06:50
< [R]>
That's your margin crap in body {}
06:51
< Meatyhandbag>
thank you
07:07 catadroid` is now known as catadroid
07:18 Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has joined #code
07:18 mode/#code [+o Crossfire] by ChanServ
08:13 Kindamoody[zZz] is now known as Kindamoody
08:14 celticminstrel [celticminst@Nightstar-qp4eva.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
08:43 Kindamoody is now known as Kindamoody|afk
08:53 catadroid` [catalyst@Nightstar-mboo88.dab.02.net] has joined #code
08:53 catadroid [catalyst@Nightstar-50mtrq.dab.02.net] has quit [A TLS packet with unexpected length was received.]
09:44 catadroid` [catalyst@Nightstar-mboo88.dab.02.net] has quit [[NS] Quit: Bye]
09:45 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Connection closed]
09:49 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
09:49 mode/#code [+o himi] by ChanServ
10:29 Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
10:50 catadroid [catalyst@Nightstar-ijpn2r.dab.02.net] has joined #code
11:00
< abudhabi>
http://habrahabr.ru/post/268421/ <- Not sure if real or not.
11:18
< ion>
Translation lends to credibility, I should think
11:18
< ion>
Looks like the right kind of circuitry for a boost converter, claims it's a boost converter, must be a backhoe
11:58
< Meatyhandbag>
http://pastie.org/10470171
11:58
< Meatyhandbag>
hey, um, my first attempt at javascript, can someone help me out? I'm trying to make the logo switch into a different logo when you mouse over it
12:05
<@gnolam>
Is it an exercise in javascript or are you simply trying to get that feature?
12:05
<@gnolam>
(Because you can do that with pure CSS)
12:15
< Meatyhandbag>
The assignment asked for an example of Javascript Content Rollover
12:39
< Meatyhandbag>
?
12:44 catadroid` [catalyst@Nightstar-6c97nt.dab.02.net] has joined #code
12:46 catadroid [catalyst@Nightstar-ijpn2r.dab.02.net] has quit [Ping timeout: 121 seconds]
12:54 catadroid` is now known as catadroid
13:06 Turaiel[Offline] is now known as Turaiel
13:06 Turaiel is now known as Tur|Work
14:04 macdjord|slep [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has quit [[NS] Quit: Remeber, you two, be smart. And if you can't be smart, be safe. And if you can't be safe, /name it after me/.]
15:44
< catadroid>
Apparently I am a meta programmer
15:44
< catadroid>
I provide general solutions to specific problems my colleagues have
17:12 Meatyhandbag [sebastianfe@Nightstar-ram.3qf.224.136.IP] has quit [Client exited]
17:19 Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has joined #code
17:19 mode/#code [+o Crossfire] by ChanServ
17:58
<@Tamber>
catadroid: You're programming your co-workers?
18:06 celticminstrel [celticminst@Nightstar-qp4eva.dsl.bell.ca] has joined #code
18:06 mode/#code [+o celticminstrel] by ChanServ
18:13
< catadroid>
to a degree, yes
18:38 catadroid [catalyst@Nightstar-6c97nt.dab.02.net] has quit [[NS] Quit: Bye]
18:38 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
19:18
< Azash>
Well it beats becoming a PM and feeling yourself turn into a scheduling algorithm
19:28 Meatyhandbag [sebastianfe@Nightstar-ram.3qf.224.136.IP] has joined #code
19:28
< catalyst>
hm?
19:31 Kindamoody|afk is now known as Kindamoody
19:41 gizmore [kvirc@Nightstar-qhrinl.dip0.t-ipconnect.de] has joined #code
19:56
< Meatyhandbag>
so, can I have some help with javascript for an assignment?
20:08
<&jerith>
I don't know very much about JS.
20:10
<&ToxicFrog>
Meatyhandbag: don't ask to ask, just ask
20:12
< Meatyhandbag>
http://pastie.org/10470171 this isn't doing anything. When I hover over the picture, it doesn't hover
20:30
<@TheWatcher>
Laod it in chrome, ctrel+shift+i to open the developer tools, move your mouse in and out of the image, do you get errors appear in the console?
20:30
<&ToxicFrog>
^ that
20:30
<@TheWatcher>
*ctrl
20:30
<&ToxicFrog>
Check the console. No obvious errors? Try calling the function directly from the console and see what, if anything, happens. Look at the DOM to see if it changes (also available in the debugging tools, under "elements")
20:34
< Meatyhandbag>
It says myImage isn't found
20:44
<&ToxicFrog>
What is the exact error message?
20:44
<&ToxicFrog>
Oh, looking at the source again I can tell you the problem
20:44
<&ToxicFrog>
Line 11: MyImage
20:44
<&ToxicFrog>
line 12: myImage
20:44
<&ToxicFrog>
JS, like most programming languages, is case sensitive.
20:47
< Meatyhandbag>
Ok, so, the image disappears now. But the replacement image doesn't come up, I just get blackness
21:01
< Meatyhandbag>
?
21:02
<&ToxicFrog>
FOB_logo_i exists and is in the right place with the right case?
21:03
< Meatyhandbag>
yeah
21:10
<&ToxicFrog>
Check the DOM after activating the rollover -- does it point to the right image?
21:10
<&ToxicFrog>
Also, when you roll off, does the initial image reappear?
21:11
< Meatyhandbag>
the DOM??
21:11
< Meatyhandbag>
Yes, when I roll off the original image return
21:11
<&ToxicFrog>
Document Object Model. Access it under the "elements" tab. The tree of elements that makes up the document.
21:12
< Meatyhandbag>
and yes, the image src is now references FOB_logo_i instead of FOB_logo_r when I hover over it
21:12
< Meatyhandbag>
but the image doesn't show
21:44 Tur|Work is now known as Turaiel[Offline]
22:50
< [R]>
<Meatyhandbag> The assignment asked for an example of Javascript Content Rollover <-- use document.getElementBySomething to get the element, then change the src property; eg: document.getElementsByTagName('img')[0].src = 'hover.jpg'
22:51
< Meatyhandbag>
hour past due-date. Hopefully my half-ass Javascripting will appease my Professor
22:52
< [R]>
You solution looks correct once the naming issue is resolver.
22:52
< [R]>
BTW, it's considered standard practice to only use leading caps on variables/functions that are classes in JS.
22:55
< Meatyhandbag>
ok
22:56
< [R]>
Mainly due to functions serving as classes
22:57
< [R]>
There's no programatic way to tell if a given function was meant to be used as a function, constructor or both.
22:58
< Meatyhandbag>
thx
22:59 Kindamoody is now known as Kindamoody[zZz]
--- Log closed Sat Oct 10 00:00:57 2015
code logs -> 2015 -> Fri, 09 Oct 2015< code.20151008.log - code.20151010.log >

[ Latest log file ]