margin

Footer's background pattern gets cuttoff when window is resized

让人想犯罪 __ 提交于 2019-12-11 17:34:31
问题 So most of this site so far uses auto centering (the container and nav have margin-left/right:auto) and things seem to go all well and dandy except for the footer. When I resize the size of the window everything is filled nicely except when I scroll horizontally the footer seems to be cut off on the right side.I've read that this may be a browser bug. Though it occurs in IE and chrome and firefox so it could just be sloppy coding (I am a big newb). Here is the css: #footer { background-image

In android custom_toast_layout, layout margin is not working

大兔子大兔子 提交于 2019-12-11 14:49:19
问题 I am using the custom toast and in it i am providing layout_margin right but it is not working any suggestion where is the problem.below is the code i am using. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/custom_toast_layout_id" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#FFF" android:orientation="horizontal" android:layout_marginRight="200dip"> <ImageView

Internet Explorer wrong margin, Others good

杀马特。学长 韩版系。学妹 提交于 2019-12-11 11:23:07
问题 I got a tiny problem. First time I am doing a UL menu with an arrow poping on the right... without JS. I got a small problem. In Internet Explorer... IE show a margin in #subMenu ul li of arround 2px (so we see the page background). In other broswer everything is fine. Also, I am suppose to the see the PNG on the right of the UL. If UL is 0px-100px left then the pic will appear at 100px-122px left. IE doesnt show the pic, other does. Good : FF 9.0.1, Safari 5.1.2, Opera 11.60, Chrome 16.0.912

margin : auto not working vertically?

杀马特。学长 韩版系。学妹 提交于 2019-12-11 11:15:47
问题 I try to vertically center a div in an outer div but it doesn't work. I tried to look around on the web but couldn't find an explanation for my specific problem... When trying to align horizontally it's working => "margin:0 auto;" Anyone ? <div style="height:240px;width:100%;"> <div style="width:33%;height:100px;margin:auto 0;"> <span class="" style="font-size:26px">Hello </span> <br/><br/> <img style="width:150px" src="example.jpeg" /> </div> </div> 回答1: margin:auto can center vertically

set page margins programmatically in crystal report

坚强是说给别人听的谎言 提交于 2019-12-11 09:53:41
问题 I m using crystal report for one of my report. I need to set the margins dynamically for the report. The margins are being set by user so I need to apply the margins programmatically. I am using the below code to set the margins programmatically. ReportDocument rd = new ReportDocument(); PageMargins pageMargins = new PageMargins(); pageMargins.leftMargin = 25; pageMargins.topMargin = 100; pageMargins.rightMargin = 25; pageMargins.bottomMargin = 50; rd.PrintOptions.ApplyPageMargins(pageMargins

Problem centering div with css

那年仲夏 提交于 2019-12-11 08:56:07
问题 I'm trying to center a div in my page but I have a very particular layout that doesn't let me center it with regular margin: auto properties. What I have is, basically this: HTML: <div id="container"> <div id="sidebar"> some text </div> </div id="content"> some text </div> </div> CSS: #container{ margin: 0 auto; width: 900px; } #sidebar{ float: left; width: 300px; } #content{ float: left; width: 600px; } This centers my container with no problems but what I need is to center the "content" div

Strange TABLE margin behaviour inside LI element

北城余情 提交于 2019-12-11 08:43:45
问题 I found a very strange margin behaviour for table when it's inside LI element. Inside LI the TABLE has additional margin at the top which cannot be cancelled by using "margin" or "padding" CSS styles. The only way to cancel this -- is to set "display: block" for LI (by default it's "display: list-item"). Here is the code: <!DOCTYPE html> <html> <head> <title>Strange table margin behaviour</title> </head> <body> <ul> <li style="border: 1px solid #009; margin: 0; padding: 0;"><table style=

IE9 img hover add's margin to bottom

纵然是瞬间 提交于 2019-12-11 07:11:41
问题 I'm having a very strange problem and have no clue on how to solve it. The webpage on where the problem occurs has a div which has several clickable images horizontal in it. When hovering the clickable images () a border of 15 pixels changes color, when leaving the hovered state the border color changes again to the original color. The weird issue is that when I hover any image in the div or leave the hover state, the margin under the div keeps enlarging, which is ofcourse unacceptable. This

Background hidden when overlaying header with negative top margins

[亡魂溺海] 提交于 2019-12-11 05:17:16
问题 I am trying to overlay a header onto an image. However the background is hidden under the image. Why is this happening? http://jsfiddle.net/YRDFB/ <div class="header"> <img width="100%" height="200px" src="/path/to/image.jpg" /> <h1>Header Title</h1></div> h1 { background: rgba(67,67,67,0.8); margin-top: -3em; } 回答1: We have 2 solutions here: Using display:inline-block and set width:100% for your h1 , also use negative margin-bottom on the img instead: h1 { background: rgba(67,67,67,0.8);

jQuery .height() doesn't return the right value

隐身守侯 提交于 2019-12-11 04:49:19
问题 I have a website that needs to be fullscreen at every screen. For this reason I use alot of jQuery to determin the height, max-height, margins, ... I have a margin-top on the container id. When i call the height, which is the base of determing the margin-top, at the end of the script, it does not give me the right amount. As long as the height of the container id is not right in var containerh, var containert will not be right either. var height = $(window).height(); var width = $(window)