PDA

View Full Version : Style JS Alert



Lee
15-01-2013, 01:51 PM
Hello, me again!

I was wondering, when you go to http://www.habbox.com/ and then type in the address bar;


javascript:alert("Lee Rules")

It isn't the default pop up window it's a styled yellow box. How is this done?

Lee.

Luke
15-01-2013, 04:33 PM
Something like this?
http://slayeroffice.com/code/custom_alert/

Lee
15-01-2013, 06:24 PM
Something like this?
http://slayeroffice.com/code/custom_alert/

Perfect thanks Luke.

Secondly,

On facebook when you get an inbox, the tab (where the favicon is) starts flashing how is this achieved? :)

Dentafrice
16-01-2013, 05:53 AM
I would imagine this is just an interval polling on the page constantly updating the title to make it appear to be changing dynamically.

setInterval and then switching back and forth every so often or rotating characters to emulate "scrolling".

Lee
16-01-2013, 02:06 PM
I would imagine this is just an interval polling on the page constantly updating the title to make it appear to be changing dynamically.

setInterval and then switching back and forth every so often or rotating characters to emulate "scrolling".

Thanks Caleb,

yet another question when you make a layout, using HTML and CSS...

When I use float:left; it means that if the div i'm floating is inside another div. The div it's inside of shoots up as if there's no content in it. How is this overcome? :)

Dentafrice
16-01-2013, 05:40 PM
Since it's a floating element, the parent container technically has no height. After the floating div, place a div with this:


<div style="clear: both;"></div>

Clears the div and sets the height below that.

http://css-tricks.com/the-how-and-why-of-clearing-floats/

Want to hide these adverts? Register an account for free!