Solved

Adjust li item

Posted on 2014-10-10
6
128 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 56

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 56

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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 56

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Json and ajax 1 23
Session on Html 8 42
Error building VS2105 solution from repository 1 38
Difference between Nuget Package and using Bower/Node.Js/Gulp 2 15
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…

726 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