margin

Margin doesn't work? Need space between two elements

爱⌒轻易说出口 提交于 2019-12-12 11:42:42
问题 First of all, I do apologize I don't put my link here, it's a site for work and I'm not allowed. I'll post the relevant parts of my code if necessary though. So the problem is pretty basic - i have one div with some images, and a header <h3> below where my content starts . No matter how much I try to create some space between the two, it doesn't work. I've tried margin and padding on both elements, changing between position relative and absolute, and throwing in lots of <br> tags. Nothing

html的c3loading大全

为君一笑 提交于 2019-12-12 11:05:23
整理了一份c3loading大全,直接复制进html即可。。。 <!doctype html> <html> <head> <meta charset="utf-8"> <title>CSS加载动画</title> <style> body { background-color: #fff; min-height: 100vh; display: flex; flex-wrap: wrap; justify-content: space-around; align-content: space-around; } section { flex: 1 1 25%; } section>div{ margin:auto; } .sk-rotating-plane { width: 4em; height: 4em; margin: auto; background-color: #337ab7; -webkit-animation: sk-rotating-plane 1.2s infinite ease-in-out; animation: sk-rotating-plane 1.2s infinite ease-in-out; } @-webkit-keyframes sk-rotating-plane { 0% { -webkit-transform: perspective

NSTextField weird left margins

眉间皱痕 提交于 2019-12-12 10:21:55
问题 I've been looking for a solution for this one all day. I have 4 NSTextFields (actually subclassed for a few custom operations), which all share the same X position. The problem is, some have different styles (light, regular, bold) and might have different sizes. What happens is that, even though the X origin is the same, the 1st letter always has a bit of (consistently different) left margins. Please see pic: https://dl.dropbox.com/u/1977230/Screen%20Shot%202012-12-11%20at%2017.55.58.png I

Margin and padding using em

谁说胖子不能爱 提交于 2019-12-12 08:18:54
问题 When 1em is applied to an element, it takes the default value of the browser (usually, 16px) or the font-size value of its parent, right?. But I noticed that if I use something like margin-top: 1em in a h1 element (without using a reset stylesheet, and therefore, h1 is set to font-size: 32px ), then 1em is equal to 32px , even if its parent element is set to font-size: 16px . However, using something like font-size: 100%; solves the discrepancy. What am I missing? 回答1: When 1em is applied to

How to set margin for Vertical Scrollbar from the right edge in ListView?

我只是一个虾纸丫 提交于 2019-12-12 07:11:23
问题 For Android Platform: I need to put margin on right side of the vertical scrollbar in listview (it is customized). Please see the attached image. Default scrollbar sticks to the extream right side of the listview. Need your hand. Thanks. 回答1: Refer to documentation on android:scrollbarStyle attribute of View . The style you probably want to use is insideOverlay (in conjunction with android:paddingRight ). Something like <LinearLayout android:orientation="vertical" android:layout_width="fill

UIViewController Nested View To Screen Edge

假装没事ソ 提交于 2019-12-12 05:28:34
问题 I have a nested view inside my view controller and when i set the leading and trailing (to superview) constraints to 0, the subview spans between left and right edges of the superview leaving a margin on both sides. How do I remove this margin without adding a negative value in the constrains? 回答1: Assuming you're using Xcode 6... There are two things to keep in mind when setting Auto Layout constraints regarding margins: 1. Adding new constraints Xcode defaults new constraints to include

Padding not being applied to element inside container element?

吃可爱长大的小学妹 提交于 2019-12-12 05:26:02
问题 Requirements I'm essentially trying to replicate the webpage output for this assignment. Pictures used in webpage are here. That's basically my ultimate goal in all of this, getting this webpage as close to the desired output as possible. All of the style must be implemented in CSS. The only HTML tags I can use are organizational ones. Problem The formatting and spacing with the webpage that I'm trying to create and replicate is unexpectedly wrong. Each of the text bubbles is supposed to be

Buttons spacing

浪子不回头ぞ 提交于 2019-12-12 04:25:24
问题 I'm trying to set the margin of the buttons to 0, (so no spacing between the buttons). Basically, I want my buttons to look something like that(with the following style and colors): Any idea how can I accomplish this kind of task? I do not want to create a 9 patch image by myself (since I don't have any knowledge doing that). 回答1: In this specific case, you can do this task easily with XMLs. This is how you can achieve it in two steps: Step 1 Create 3 shapes in drawable folder: First shape is

Margin or padding what is recommended?

前提是你 提交于 2019-12-12 04:07:00
问题 I have made some code and css, now I'm learning to understand them.. What is the difference if I use margin or padding? What is recommended to use on my <p> tag? I'm using margin now, but margin is for the outside of an element, why whould I use that if padding is for the space between the content and border. So let's start what I have: <div id="MainContainer"> <section> <article> <h1>Title</h1> <p> text text text text text </p> </article> </section> </div> My CSS looks like this

Unknown white border around my content

徘徊边缘 提交于 2019-12-12 03:52:30
问题 I've created an utterly simple page with only a few elements. I have a white border around my 'content div' and can't figure out what is causing it. It is appearing only top and left of my content. I've tried removing it with .body { border: 0; }, but that did not help. Also a few other things with regard to my CSS, but solved it. Here is my HTML code: <!DOCTYPE html> <html lang='en'> <head> <meta charset='UTF-8' /> <title>Olivera Miletic graphic desig</title> <link rel='stylesheet' href=