Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Just like in ebay.in, i want the automatic image slider at left & details at right as soon as the user clicks the item in the Datalist. Please Assist.

What I have tried:

I tried nothing because i am a beginner. I just Added a 'WebForm with Master Page' in my Project. That's all.
Posted
Updated 31-Mar-16 11:52am
v2
Comments
ZurdoDev 31-Mar-16 13:37pm    
Yes, probably use divs. I suggest googling for 2 column layout or find some example of what you want.
F-ES Sitecore 31-Mar-16 13:43pm    
You can't learn such a complicated and board thing such as programming a website from asking questions on a forum. Buy a book on asp.net and go through it to learn the basics. That will get you started and when you are stuck you can ask specific questions about specific problems.
Sergey Alexandrovich Kryukov 31-Mar-16 17:36pm    
Yes. And you can do it fully in CSS, without using JavaScript. Give one inner div certain length, possibly in %, full remaining room to another one. My approach would be using CSS display "table" and "table-cell", which is a very reliable way. Then one or both cells width can be defined by the width of its inner content, both taking 100% of width.
—SA

1 solution

Please see my comment to the question. This is the simple illustration of the idea:
HTML
<html>
   <head>
      <title>Two-column demo</title>
      <style type="text/css">
         div { padding: 2em; }
         div.debug { border: thin solid red; }
         div.outer { display: table; width: 90%; }
         div.left { display: table-cell; width: 1; }
         div.right { display: table-cell; text-align: center; vertical-align: middle; font-size: 160%; }
      </style>
   </head>
<body>

<div class="outer">
<div class="left"><img src="http://www.codeproject.com/script/Membership/ProfileImages/%7B8b7ec440-05c1-492f-9e09-7d256dbd32d6%7D.jpg"/></div>
<div class="right">I can see you…</div>
</div>

</body>
</html>
Note that I use the class "debug" for debugging. Normally, you don't want to see those red borders. But to check up the layout, you can quickly add them by replacing class="left" and class="right" with class="left debug" and class="right debug".

See also: display — CSS | MDN[^].

—SA
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900