Solved

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

Posted on 2016-08-17
8
40 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
Industry Leaders: 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 500 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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
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?
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

724 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