Jump to content

Piece of css


Html

Recommended Posts

I'm confused. Do you mean how is the instantaneous toggle achieved, or how the gradient is achieved?The gradient is with images.

Link to comment
Share on other sites

You mean just using background-color? It is possible, but you'll need lots of nested divisions to achieve a smooth effect.The transition is done with JS.

Link to comment
Share on other sites

View -> Page source?For the toggle, you can just use the style.display property.

function toggle() {	if(document.getElementById("div1").style.display == "block") {		document.getElementById("div1").style.display = "none";		document.getElementById("div2").style.display = "block";	} else {		document.getElementById("div1").style.display = "block";		document.getElementById("div2").style.display = "none";	}}

<a href="java script:toggle()">Div 1</a> <a href="java script:toggle()">Div 2</a><div id="div1">Content 1</div><div id="div2">Content 2</div>

Link to comment
Share on other sites

Look for the gradient tool. It should look like a rectangle. It's not there, right-click on the paint bucket. That makes gradients like the ones you see on the buttons.

Link to comment
Share on other sites

Why are they called gradients?
http://www.answers.com/gradient
The rate at which a physical quantity, such as temperature or pressure, increases or decreases relative to change in a given variable, especially distance.
Because the physical quantity "color" is changing from one value to another relative to a change in a given variable (height, width, etc).
Link to comment
Share on other sites

Download Firebug for Mozilla Firefox - you can use its "inspect" tool to view the CSS properties of any element on any page. Very useful.

Link to comment
Share on other sites

I don't see as there is a problem with it, as long as you understand their code. If you copy and don't understand then you don't learn anything. But if you copy and tweak, edit and maybe delete some bits, add extra bits in and understand the code then it is your code is it not?

Link to comment
Share on other sites

<div section="newsBelowTopMPUArea.0"> </div><div id="multimedia" section="newsMultimediaArea.0"></div><script type="text/javascript"></script><div id="readersChoice"><div id="rcTabs"><h4 id="mostPopTab" class="" onclick="showMostPop();"><span>most popular</span></h4><h4 id="mostDiscTab" class="selected" onclick="showMostDisc();"><span>most discussed</span></h4></div>

That was the code for all that to do with the buttons... :)

Link to comment
Share on other sites

That's the HTML code. The JS code is the bit that actually does the switching.Did you try using my code?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...