Login | Iscriviti | FAQ
Anonymous

how to make the rest of the divs slide when one is clicked

+ Rispondi al messaggio

2 messaggi Pagina 1 di 1


how to make the rest of the divs slide when one is clicked

da Dayve » mar ott 28, 2014 9:31 am

I have four divs and those four divs have an anchored link to another page of my website. I am trying to get to have box2, box3 and box4 slide to the right of the screen when box1 is click thus allowing me to show the content on the center of the page. The same should apply to box2, box3 or box4 should they be clicked.
Which is the best way to do this? Can this be done with CSS3?

Thanks

<html>
<head>
</head>
<body>
<div id="box1">
<a href="#">link1</a>
</div>
<div id="box2">
<a href="#">link2</a>
</div>
<div id="box3">
<a href="#">link3</a>
</div>
<div id="box4">
<a href="#">link4</a>
</div>
</body>
</html>

CSS


#box1, #box2, #box3, #box4
{
display:block;
width:200px;
height:auto;
margin-left: auto;
margin-right: auto;
}
Avatar utente

Dayve

  • Messaggi: 2
  • Iscritto il: dom mar 23, 2014 1:03 pm

Re: how to make the rest of the divs slide when one is click

da XainPro » sab nov 01, 2014 12:40 pm

I have not tries it with css3 but there is a property of content
http://www.w3schools.com/cssref/pr_gen_content.asp

check this out maybe this would help but i think this work is best done with Jquery.
Avatar utente

XainPro

  • Messaggi: 3933
  • Iscritto il: ven feb 17, 2012 8:10 pm


+ Rispondi al messaggio

Pagina 1 di 1