Solved

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

Posted on 2016-08-17
8
32 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
  • 4
  • 3
8 Comments
 
LVL 17

Expert Comment

by:xtermie
Comment Utility
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 82

Expert Comment

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

Expert Comment

by:xtermie
Comment Utility
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
 

Author Comment

by:MOSTAGHASSI
Comment Utility
@xtermie,have you test your codes in that panel?It doesn't work.
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 17

Expert Comment

by:xtermie
Comment Utility
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
Comment Utility
Thanks,yes but just 1px gap as a vertical line(white) between each item.
0
 

Author Comment

by:MOSTAGHASSI
Comment Utility
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 17

Accepted Solution

by:
xtermie earned 500 total points
Comment Utility
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

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!

Join & Write a Comment

CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
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.…

772 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

13 Experts available now in Live!

Get 1:1 Help Now