Solved

Adjust li item

Posted on 2014-10-10
6
122 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 51

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 51

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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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 51

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
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…

758 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

17 Experts available now in Live!

Get 1:1 Help Now