473,594 Members | 2,663 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What's pushing this list item down?

97 New Member
I have a list with six items and the third one is not in the place it should be.

Here's the html:

Expand|Select|Wrap|Line Numbers
  1. <ul>
  2. <!--1-->
  3. <a href="">
  4.  <li><img class="hp_img" src="images/homepage/W12.png" width="145" height="182" alt="W12 2 in 1 tablet">
  5.   <p class="hp_ad_txt">W12 2-in-1 Tablet<br />-------<br />12" Screen</p>
  6.  </li>
  7. </a>
  8.  
  9. <!--2-->
  10. <a href="">
  11.  <li><img class="hp_img" src="images/homepage/4U.jpg" width="145" height="182" alt="Dream Micro 4U Server">
  12.   <p class="hp_ad_txt">Dream<br />Micro 4U Server<br />--------<br />Full Scalability</p>
  13.  </li>
  14. </a>
  15.  
  16. <!--3-->
  17. <a href="">
  18.  <li><img class="hp_img" src="images/homepage/H81.jpg" width="180" height="132" alt="Dream Vision H81 All In One PC" style="padding-top:20px;">
  19. <p class="hp_ad_txt">Dream Vision H81<br />-------<br />All In One PC</p>
  20.  </li>
  21. </a>
  22.  
  23. <br />
  24.  
  25. <!--4-->
  26. <a href="">
  27.  <li><img class="hp_img" src="images/homepage/MINI_PC.jpg" width="180" height="132" alt="Dream Vision Mini P C" style="padding-top:20px;">
  28.  <p class="hp_ad_txt" style="margin-top:20px">Dream Vision <br />-------<br />Mini Pc</p>
  29.  </li>
  30. </a>
  31.  
  32. <!--5-->
  33. <a href="">
  34.  <li><img class="hp_img" src="images/homepage/P77.jpg" width="180" height="132" alt="Dream Book Laptops" style="padding-top:20px;">
  35.   <p class="hp_ad_txt" style="margin-top:30px">Dream Book<br />-------<br />Laptops</p>
  36.  </li>
  37. </a>
  38.  
  39. <!--6-->
  40. <a href="">
  41.  <li><img class="hp_img" src="images/homepage/5018D.jpg" width="180" height="132" alt="5018D Server" style="padding-top:20px;">
  42.   <p class="hp_ad_txt" style="margin-top:10px">5018D Server<br />-------<br />Starting at $1249</p>
  43.  </li>
  44. </a>
  45. </ul>
  46.  
And the css:

Expand|Select|Wrap|Line Numbers
  1. .col2 ul{
  2.     display:block;
  3.     list-style:none;
  4.     margin:0;padding:0;
  5.     text-align:center;
  6. }
  7. .col2 ul a li{
  8.     display:inline-block;
  9.     width:305px;
  10.     height:212px;
  11.     margin:0 auto;
  12.     background-image:url('images/homepage/border.png');
  13.     background-repeat:no-repeat;
  14.     padding-top:5%;
  15.     color:green;
  16.     position:relative;
  17. }
  18. .hp_img{
  19.     margin:-45px 100px 0 0;
  20. }
  21. .hp_ad_txt{
  22.     position:absolute;
  23.     top:5%;left:45%;
  24.     text-align:center;
  25. }
  26.  
Aug 13 '15 #1
1 3352
tdrsam
97 New Member
Nevermind. It was the height of the image that was causing the problem, so I just edited the image and the problem is fixed.
Aug 14 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1930
by: Peter Otten | last post by:
There is currently a discussion on python-dev about an extract() function which offers fast access to list items and object attributes. It could serve, e. g., as the key argument of the future list.sort() method: extract("attr") # extract an attribute extract(1) # extract a list item Below is a slight variation of this idea, together with a pure-python implementation. As a "real" C version is currently beyond me, I chose not to post...
2
7802
by: Chris | last post by:
I was wondering if there was any way to add a blank list item control to the beginning of the System.Web.UI.WebControls.DropDownList's datasource after the control's datasource has been specified. Here's my code right now: Dim oEmptyOption as New ListItem() 'Assign datasource to delivery date type combobox
5
11156
by: Naveen K Kohli | last post by:
I am try to set the text of the drop down list item as ListItem li = new ListItem(); li.Text = "&nbsp;"+"MyValue"; myDropDown.Items.Add("li); The intent is to add a spacing in front of the text. Its not doing what I am trying to do. The text shows up as "&ampMyValue"
13
15949
by: deko | last post by:
http://www.liarsscourge.com/ewpi.html The list numbers should be formatted as <h3>, but other text within the <li> should be normal text. <ol> <li> <h3 id="d2">Download latest WordPress code</h3> </li>
4
19451
by: SM | last post by:
Hello, I have an unordered list similar to this one: <ul id=list> <li onclick="addParagraph(0)">Item 1</li> <li onclick="addParagraph(1)">Item 2</li> <li onclick="addParagraph(2)">Item 3</li> </ul>
9
3119
by: hooijdonk | last post by:
Hi, using a form I have been trying to get a list box to display the values of database table and have two options on there. a) the user can select a list item and click a button to delete that item b) the user can type text into a text box and click another button to add that value to the list box (and therefore the table sitting behind it) i found a very useful starting point here http://www.thescripts.com/forum/thread634077.html ...
2
2122
vikas251074
by: vikas251074 | last post by:
I am creating an application for official use. This application will be used by employees to take items for official use. I have a list, presently this list contains three items - 1) Cartridges, 2) Floppy, 3) CD Note : If a user selects Cartridges then list of printer should display, And if floppy or CD is selected, then 'purpose' text item should display. And many many more,
1
7232
by: libish | last post by:
can we add a value to a list item?? i got a list with some list members here can we add a value to that list item??? ie. suppose a list contains items like "item1" "item2" "item3" etc...
0
7947
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7880
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8255
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8010
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5413
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3868
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3903
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2389
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1486
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.