Padding Between "display:table-cell" [closed] - javascript

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
Is there a way to place padding or a transparent border around the "cells" when one does display:table-cell? I would like the background to show up through this space, so I can't just set the border to white, and border-color:transparent doesn't work for me for some reason. I've checked w3schools and similar sites but I haven't been able to find this particular trait.
From user Praveen Vijayan: http://jsfiddle.net/geymU/

Use border-spacing: 10px on the parent container.
In your case
#nav ul{
display:table;
width:100%;
border-spacing: 10px;
}
You can also give top/bottom and left/right separately like border-spacing: 10px 20px;

The space between cells is controlled by the border-spacing and border-collapse properties in the table.
#nav ul {
display: table;
width: 100%;
background: yellow;
border-collapse: separate;
border-spacing: 12px 6px;
}

Related

Can someone explain this CSS code to me? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am trying to work on adjusting the size of a picture from a web page.
My friend wrote something, and I am trying to learn from it. What does this code do?
div.page-full-width div#primary div#content div.entry-content div#bbpress-forums div.bbp-reply-form form#new-post fieldset.bbp-form div p.bbp-attachments-form label.btn {
width: 9vw;
height: 1vw;
}
.entry-buddypress-content div#buddypress div.full-width div#item-body div.profile div#subnav {
width: 21vw !important;
height: 8vw !important;
padding-right: 2vw !important;
margin-bottom: 0;
}
#members-stream li .action div.generic-button a, #members-list li .action div.generic-button a {
font-size: 3vw;
line-height: 4vw;
}
some are #, some are . and some are div., how do they work to target specific lines from HTML code?
#foo selects the element with the id foo. (See MDN)
.bar selects all elements with the class bar. (See MDN)
More about CSS selectors in general.
.test is for classes in html
#test is for Ids in html
div. selectes all divs with this classname
Width: 9vw means view width so the image is 9% of the view width
He basically selected with this css a lot of Ids and Classes and gives them a height, width, distance inside(padding), distance outside(margin), font size and the line height(on which height the text should be displayed).
Hope this helps

How to remove spacing between the top of a border and a div [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 7 years ago.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Improve this question
I currently have a div that is displaying a chart. In my HTML page, I have given it the ID of "main". In my CSS, I am trying to bring the chart a bit more up in the page, however, have had issues. I currently have a border, and am trying to bring the chart up to the border. In other words, I won't want any padding/space between the div and the top of the border. This is how it looks like right now:
And here is how my CSS code looks like right now:
#main {
position:relative;
width:95%;
left:3%;
border: 3px solid green;
padding-top: 0px;
}
Any help would be appreciated. Thanks!
Try applying negative marging or negative top to your chart container...
Ex:
#main {
position:relative;
width:95%;
left:3%;
border: 3px solid green;
padding-top: 0px;
top:-20px
}
or
#main {
position:relative;
width:95%;
left:3%;
border: 3px solid green;
padding-top: 0px;
margin-top:-20px;
}

jQuery and CSS drop down, hover and drop downs disappears [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I see a lot of people have asked about this problem, but none of what i've found has helped. I have a dropdown that displays on hover of list link, and first link in drop down hovers no problem. But, when I hover on the second link the drop down disappears. I don't understand what I'm doing wrong.
enter code herehttp://jsfiddle.net/yoq0wyds/
Remove the hard width you have applied to your ul element.
#cssmenu > ul li.has-sub ul {
text-align: left;
display: none;
/* width: 24px; */
position: absolute;
margin: 0;
padding: 0;
list-style-type: none;
background: #ffffff;
border: 1px solid #ece6e8;
border-bottom: 3px solid #d9ced2;
border-top: 0 none;
}
Function example
width is not 24px. hover works fine, but only in the first 24px. remove the width setting and this works fine.
...
#cssmenu > ul li.has-sub ul {
text-align: left;
display: none;
width: 24px;
...

Template conversion from XHTML 1 to HTML5 , CSS Error [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
This is a simple 3-column template, with Side-bars on Left and on Right sides and content in the middle. I'm not able to understand the spacing between the columns, there's too much of space between the content(post) column and right side-bar.
[side-bar] [content/ post / matter]_____space/gap___[side-bar]
I'm not able to reduce/remove the '_space/gap ' to make the template look like
[side-bar] [content/ post / matter] [side-bar]
Before posting this here, I've tried chrome-developer tool to know and refactor it, I've not been able to understand it.
JSFiddle Example
Change this section of your code:
#right {
float: right;
width: 180px;
padding: 10px 30px 10px 0;
}
to this:
#right {
float: left;
width: 180px;
margin-left: 10px;
padding: 10px 30px 10px 0;
}
Floating right will hold that container to the rightmost position it can attain within its own container.

how to adjust background images with caption [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
http://awdhesh.goebasket.com/smartiq2/!
in chrome browser i am getting extra padding at the bottom how to remove that one how
i tried with this css code
figure#caption {width:100%; float:left; padding:7px 0; background:#333; color:#fff; font-size:24px; position:relative; top:556px; text-align:center; font-weight:500;}
figure#caption strong {font-size:36px; font-weight:600; display:block;}
figure#caption strong b{color:#E74C3C;}
still i am unable to solve this issue
You are fixing the top value top:556px; which would vary in different browsers. You need to set bottom:0 to the bottom div with absolute position.
.topfix {
height: 100%; /*add other styles*/
}
figure#caption {
position: absolute; /*add other styles*/
bottom: 0;
}
add position relative in following class:(may be you have to adjust 'top' property of class 'figure#caption')
.topfix .navbar-default
{
background: none;
border: none;
position: relative;
}

Categories

Resources