?
Solved

Putting small gap between elements in this <ul><li>

Posted on 2016-08-17
8
Medium Priority
?
41 Views
Last Modified: 2016-08-17
Hello;

Please see this link below and its codes,i need that put 1px gap between the list items./thanks

http://www.w3schools.com/html/tryit.asp?filename=tryhtml_lists_menu
0
Comment
Question by:MOSTAGHASSI
[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
  • 4
  • 3
8 Comments
 
LVL 18

Expert Comment

by:xtermie
ID: 41759013
You need a Ul LI block in the style section, with padding set to what you want, something like this added to your code
ul li {
  display: inline-block;
  border: 1px solid red;
  color: grey;
  text-align: center;
  width: 10rem;
  height: 8rem;
  margin: 0;
  padding: 0;
  position:relative;
}
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 41759014
Your comment / question doesn't make any sense.  You need to show us your code and tell us what you need.
0
 
LVL 18

Expert Comment

by:xtermie
ID: 41759016
or something like this will look closer to what you want
ul li {
  display: inline-block;
  border: 0px solid black;
  color: white;
  text-align: center;
  width: 10rem;
  height: 3rem;
  margin: 0;
  padding: 1;
  position:relative;
}
0
Independent Software Vendors: 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!

 

Author Comment

by:MOSTAGHASSI
ID: 41759021
@xtermie,have you test your codes in that panel?It doesn't work.
0
 
LVL 18

Expert Comment

by:xtermie
ID: 41759033
yes I have tried it, just placed it above </style>
If the example produces more or less space than what you want you can tweak the numbers
see my example

Unless I did not understand what you actually needed; please explain furhter
UL-LI-example.png
0
 

Author Comment

by:MOSTAGHASSI
ID: 41759140
Thanks,yes but just 1px gap as a vertical line(white) between each item.
0
 

Author Comment

by:MOSTAGHASSI
ID: 41759153
Hi Dave,please visit the link ,there are codes in that link,i need 1px gap as a vertical line(white) between each item in that example in the link.
http://www.w3schools.com/html/tryit.asp?filename=tryhtml_lists_menu
0
 
LVL 18

Accepted Solution

by:
xtermie earned 2000 total points
ID: 41759243
Try this
ul li {
   display: inline-block;
   border: 1px solid white;
   color: white;
   text-align: center;
   margin: 0;
   padding: 1;
   position:relative;
 }
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
Suggested Courses
Course of the Month12 days, 22 hours left to enroll

777 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