Solved

Adjust li item

Posted on 2014-10-10
6
124 Views
Last Modified: 2014-10-11
Hi,
I know it is one li item below
https://dl.dropboxusercontent.com/u/40211031/t826.png

is there one example to that kind of li item that is showing the same like the above, and when the mouse is hovering on top of the li item, it will show with more details like
https://dl.dropboxusercontent.com/u/40211031/t827.png
0
Comment
Question by:HuaMinChen
  • 3
  • 3
6 Comments
 
LVL 52

Accepted Solution

by:
Julian Hansen earned 500 total points
ID: 40372662
Try this
<!doctype html>
<html>
<head>
<title>Test</title>
<script src="http://code.jquery.com/jquery.js"></script>
<script type="text/javascript">
$(function() {
});
</script>
<style type="text/css">
ul {
  list-style: none;
}
ul li {
  display: inline-block;
  position: relative;
  height: 194px;
  width: 259px;
}
ul li > div {
  background: rgba(255,255,255,0.5);
  color: blue;
  width: 100%;
  box-sizing: border-box;
  padding: 5px 10px;
  position: absolute;
  bottom: 0;
}
ul li div div {
  display: none;
}
ul li:hover div div {
  display: block;
  color: black;
}
</style>
</head>
<body>
<ul>
  <li>
    <img src="test.jpg" />
    <div>
      Normal text
      <div>Additional Text</div>
  </li>
</ul>
</body>
</html>

Open in new window

Working sample here http://www.marcorpsa.com/ee/e015.html
0
 
LVL 10

Author Comment

by:HuaMinChen
ID: 40374406
Many many thanks Julian.

how to apply your way to "Additional text" to tb_p1_desc2 textbox below?

    <style type="text/css">
         ...
         ul.imagesList .imagesList-item-frame {
             border: solid 1px #dcdcdc;
             position: absolute;
             padding: 3px;
             top: 3px;
             right: 3px;
             bottom: 3px;
             left: 3px;
         }
         ul.imagesList li img {
             width: 100%;
             height: 140px;
         }
         ul.imagesList li .legend {
             width: 100%;
             margin: 3px 3px 0 3px;
         }
         ...
    </style> 
                    <li><a href="#">
                        <div class="imagesList-item-frame shadow">
                            <img src=<%=lb_pict1.Text %> />
                            <div class="legend">
                                <div style="height:18px; width:92px; font-size:small; border:none; background-color:#1BA8E0">
                                    <label id="Label13" runat="server"><b>Desc</b></label>
                                <div>
                                <input type="textbox" id="tb_p1_desc" style="height:20px; width:116px; border:inherit; background-color:#F0FAF9;" runat="server" /><br/>
                                <input type="textbox" id="tb_p1_desc2" style="height:20px; width:116px; border:inherit; background-color:#F0FAF9;" runat="server" /><br/><br/>
                                <input type="button" id="butt_p1" onclick="openPopup();" style="height:23px; width:97px" value="Test" runat="server" />
                            </div>
                        </div>
                    </li>
                    ...

Open in new window

0
 
LVL 52

Assisted Solution

by:Julian Hansen
Julian Hansen earned 500 total points
ID: 40374507
I am confused about the following

a) you have input type="textbox" - do you want a <textbox> or input type="text"? textbox is not a valid attribute for the input element http://www.w3schools.com/tags/tag_input.asp

b) Do you only want that textbox to be shown on hover

c) The textboxes, Desc and button are currently showing below the image - do you want them all to be positioned over the image - is that part of your question?

Here is some code - not sure if it does what you want but try it and let me know
<!doctype html>
<html>
<head>
<title>e</title>
    <style type="text/css">
		 ul.imagesList li {
			position: relative;
			border: 1px solid black;
		 }
         ul.imagesList .imagesList-item-frame div.legend{
             border: solid 1px #dcdcdc;
             position: absolute;
             padding: 3px;
             bottom: 3px;
         }
         ul.imagesList li .legend {
             width: 100%;
             margin: 3px 3px 0 3px;
         }
		 ul.imagesList li:hover input {
			display: block !important;
		 }
    </style> 
</head>
</body>	
	<ul class="imagesList">
		<li><a href="#">
			<div class="imagesList-item-frame shadow">
				<img src="test.jpg" />
				<div class="legend">
					<div>
						<label id="Label13" runat="server"><b>Desc</b></label>
					<div>
					<input type="text" id="tb_p1_desc" style="height:20px; width:116px; border:inherit; background-color:#F0FAF9;" runat="server" /><br/>
					<input type="text" id="tb_p1_desc2" style="height:20px; width:116px; border:inherit; background-color:#F0FAF9; display: none" value="TEST:" runat="server" /><br/><br/>
					<input type="button" id="butt_p1" onclick="openPopup();" style="height:23px; width:97px" value="Test" runat="server" />
				</div>
			</div>
			</a>
		</li>
	</ul>
</body>
</html> 

Open in new window

0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 10

Author Comment

by:HuaMinChen
ID: 40374522
Thanks a lot Julian.
How to decrease the space between textbox and text item below?
https://dl.dropboxusercontent.com/u/40211031/t830.png
0
 
LVL 52

Expert Comment

by:Julian Hansen
ID: 40374541
Delete the <br/> element from the end of the line
If necessary add a margin to the input to create whatever gap you need between them.
0
 
LVL 10

Author Closing Comment

by:HuaMinChen
ID: 40374562
Many thanks Julian.
Can you please help to this thread?
http://www.experts-exchange.com/Programming/Languages/.NET/Q_28535047.html#a40372342
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now