Zaloguj | Zarejestruj | FAQ
Anonymous

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

+ Odpowiedz

Posty: 2 Strona 1 z 1


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

przez Dayve » Wt paź 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 użytkownika

Dayve

  • Posty: 2
  • Dołączył(a): N mar 23, 2014 1:03 pm

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

przez XainPro » So lis 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 użytkownika

XainPro

  • Posty: 3933
  • Dołączył(a): Pt lut 17, 2012 8:10 pm


+ Odpowiedz

Strona 1 z 1