Search Results

Search found 2724 results on 109 pages for 'absolute positioning'.

Page 8/109 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Chrome / Firefox - positioning slightly off

    - by user352241
    Firefox and Chrome are positioning elements slightly off from each other - like a few pixels. Below are screen shots so you can see what I'm talking about. Can't figure out a fix. Notice the word 'giants' is positioned way higher on the firefox browser. Firefox: http://lh6.ggpht.com/_g1qpMbjSY1o/S_61DmN5BoI/AAAAAAAAAS0/3K5iCIxMYxk/s800/Firefox.jpg Chrome: lh4.ggpht.com/_g1qpMbjSY1o/S_61DQykEzI/AAAAAAAAASw/GDVEGdmISRg/s800/Chrome.jpg

    Read the article

  • CSS position absolute doesn't work in IE7

    - by Syom
    i have the following simple script, but it doesn't work in IE7 <div id="content"> <div id="left"></div> <div id="right"></div> <div id="bottom_menus">any text here...</div> </div> and CSS #content { margin: 0 auto; padding: 0; width: 980px; background-color: lime; height: 800px; overflow: hidden; position: relative; } #left { width: 275px; float: left; background-color: olive; margin: 0px 0px -5000px 0; padding: 0 0 5000px 0; min-height: 400px; } #right { width: 704px; float: left; background-color: red; margin: 0px 0px -5000px 0; padding: 0 0 5000px 0; min-height: 400px; } #bottom_menus { background-color: orange; height: 15px; position: absolute; bottom: 0px; width: 100%; } why position absolute doesn't work? thanks in advance

    Read the article

  • Position absolute for rounded corners and problems in IE6

    - by danit
    Im using position absolute to give the top left corner of a DIV a rounded corner. HTML: <div id="MyDiv"> Some content <div class="topLeft">&nbsp</div> </div> CSS: #MyDiv { position: relative; padding: 12px; background: #fff url('graident.png') repeat-x top left; } .topLeft { position: absolute; top: 0; right: 0; width: 10px; height: 10px; background: transparent url('corner.png') no-repeat top right; } This works fine in all browsers expcept IE6. In IE6 the corner.png image seems to be about 1px out at the top corner, essentially not top: 0; and right: 0; but more like top: 1px; right: 1px; Can anyone explain why this might be happening only in IE6?

    Read the article

  • How to get attributes from both relative and absolute positioning

    - by user3677286
    I have a footer that i want to attach to the bottom of the page using bottom:0px. However, I also want to center it by using margin-left:auto; and margin-right:auto;. Effectively, this will stick the footer to the bottom of the page while keeping it centered vertically. Unfortunately, these cannot be used together as bottom:0px requires position:relative while margin-left:auto and margin-right:auto require position:absolute. How can I get both of these attributes onto the same div without creating a container? If not possible, what is a clean way of getting both these attributes? ALSO: I do NOT want to have a fixed position. footer.css: .footer { /*background-color:blue;*/ min-height:10px; width:940px; margin-top:5px; margin-left:auto; /* WILL ONLY WORK IF POSITION IS RELATIVE */ margin-right:auto; padding:5px; display:block; border-top: 3px solid #CCCCCC; text-align: center; font-family:arial; color:gray; position: relative; bottom:0px; /* WILL ONLY WORK IF POSITION IS ABSOLUTE */ } Thanks.

    Read the article

  • CSS Relative sized header/footer

    - by superexsl
    Hi I'm not a CSS expert so I might be missing something obvious. I'm trying to set a relative size header and footer (so that on larger monitors, the header and footer are larger than on smaller screens). To do this, I'm using a percentage height. However, this only works if I set the position to absolute. The problem is, setting it to absolute means that it overlaps the main part of the screen (inbetween the header and footer). Setting it to relative doesn't work since it relies on items being inside the header/footer. This is what my header looks like: .header { position:absolute; top:0px; background-color:white; width:100%; height:30%; } the ASPX page simply contains <div class="header"></div> Is there a way to get relatively proportioned header and footers? Thanks

    Read the article

  • get absolute file path from image in WPF

    - by melculetz
    I have something like this in my xaml: <Grid> <Image Name="image" Source="../../Images/DefaultImage.png" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"></Image> </Grid> How can I get (using my code-behind c# code) the absolute path of the image source?

    Read the article

  • Retrieving Absolute URL from File on Mounted Volume in Cocoa

    - by Bryan Kyle
    Is there any way of retrieving an absolute URL for a file on a mounted volume in Cocoa? For example, say afp://server/Documents is mounted at /Volumes/Documents. How can I get full URL to a file on the mounted volume in the form of afp://server/Documents/path/to/file? I've tried using statfs but the value of f_mntfromname doesn't contain a url, it contains the same value that is given by the mount command.

    Read the article

  • Wicket: Relative to absolute URL or get base URL

    - by Gilean
    If I have a relative path to a static asset (flash/blah.swf), what is the best way to convert this to an absolute URL (http://localhost/app/flash/blah.swf)? Or what is the best way to get the base URL of the Wicket application? I've tried using RequestUtils.toAbsolutePath but it doesn't seem to work reliably and is frequently throwing exceptions.

    Read the article

  • IE CSS bug: table border showing div with visibility: hidden, position: absolute

    - by Alessandro Vernet
    The issue I have a <div> on a page which is initially hidden with a visibility: hidden; position: absolute. The issue is that if a <div> hidden this way contains a table which uses border-collapse: collapse and has a border set on it cells, that border still shows "through" the hidden <div> on IE. Try this for yourself by running the code below on IE6 or IE7. You should get a white page, but instead you will see: Possible workaround Since this is happening on IE and not on other browsers, I assume that this is an IE bug. One workaround is to add the following code which will override the border: .hide table tr td { border: none; } I am wondering: Is this a known IE bug? Is there a more elegant solution/workaround? The code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <style type="text/css"> /* Style for tables */ .table tr td { border: 1px solid gray; } .table { border-collapse: collapse; } /* Class used to hide a section */ .hide { visibility: hidden; position: absolute; } </style> </head> <body> <div class="hide"> <table class="table"> <tr> <td>Gaga</td> </tr> </table> </div> </body> </html>

    Read the article

  • use absolute or relative path?

    - by ajsie
    in my config.php where i have all constants i set the PATH to a absolute path. but this means that when i move my application folder i have to change this path. i wondered if its better to set a relative path, in that way whenever i move my application between production and development folder, i dont have to change it. how do you guys do when you move between folders?

    Read the article

  • Absolute UriSource of a Resource image

    - by Louis Rhys
    I have a WPF project. If I store image in {ProjectRoot}\Images\image.png, and compile it as Resource then I can access it from a xaml (this xaml is located at Root) as BitmapImage by BitmapImage UriSource="Images/image.png". But if I move the xaml to another folder, say {ProjectRoot}\Xamls, now I have to use BitmapImage UriSource="../Images/image.png". Is there a way to specify an absolute project path, so that I can refer to them with the same path regardless of the location of the xaml?

    Read the article

  • Position: absolute a div over Flash

    - by Sam
    Is it possible to position: absolute a <div /> over a Flash banner without adding wmode="transparent" to the banner? I have a lightbox that needs to appear above my ads but I can't directly modify the banners as they come from a third party.

    Read the article

  • position:absolute within border-radius and overflow:hidden

    - by JaNightmare
    I had a problem with border-radius in webkit browsers and found the solution at the following URL: How to make CSS3 rounded corners hide overflow in Chrome/Opera but iam using a another element with position: absolute; inside this now I need to make the caption with rounded border too, but do not know how note: i can't use another border-radius in caption, because this will have an animation see the code with: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Problem</title> <style type="text/css"> img { border: 0; } a { text-decoration: none; } .wrap-events { float: left; position: relative; width: 500px; height: 250px; } .events { overflow: hidden; -webkit-border-radius: 50px; -moz-border-radius: 50px; border-radius: 50px; } .caption { position: absolute; width: 100%; bottom: 0; color: #FFFFFF; background-color: #151515; font: 12px "Arial", Helvetica, sans-serif; opacity: 0.6; border-radius: 0 0 50px 50px; /* add border-radius to caption */ } .caption p { padding: 10px; } </style> </head> <body> <div class="wrap-events"> <div class="events"> <a href="#"> <img src="http://www.cg-auto.com.br/forum/imagens/imagens_news/26c4dc4359edcfd4c6871ee1fa958539.jpg" alt="image"> </a> <div class="caption"> <p>This is a caption</p> </div> </div> </div> <button id="slide">Slide It!</button> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script type="text/javascript"> $('#slide').click(function(){ $('.caption').hide().slideDown(2000); }); </script> </body> </html> cheers

    Read the article

  • Making an svg image object clickable with onclick, avoiding absolute positioning

    - by user256410
    I have tried to change the images on my site from to svg, changing img tags to embed and object tags(standard procedure, i think). But, implementing the onclick function, which previously was contained in the img tag is proving most difficult. I found onclick had no effect when placed inside the object or embed tag. So, I made a div exclusively for the svg, and placed onclick in this div tag. But, no effect unless visitor clicks on the edges/padding of the image. I have read about overlaying a div, but am trying to avoid using absolute positioning, or specifying positions at all. Maybe there's a way to do it without specifying postions? Or maybe theres another way to apply onclick to a svg. Has anyone encountered this problem? Questions and suggestions are welcome.

    Read the article

  • SWT Layout for absolute positioning with minimal-spanning composites

    - by pure.equal
    Hi, I'm writing a DND-editor where I can position elemtents (like buttons, images ...) freely via absolute positioning. Every element has a parent composite. These composites should span/grasp/embrace every element they contain. There can be two or more elements in the same composite and a composite can contain another composite. This image shows how it should look like. To achive this I wrote a custom layoutmanager: import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Layout; public class SpanLayout extends Layout { Point[] sizes; int calcedHeight, calcedWidth, calcedX, calcedY; Point[] positions; /* * (non-Javadoc) * * @see * org.eclipse.swt.widgets.Layout#computeSize(org.eclipse.swt.widgets.Composite * , int, int, boolean) * * A composite calls computeSize() on its associated layout to determine the * minimum size it should occupy, while still holding all its child controls * at their minimum sizes. */ @Override protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) { int width = wHint, height = hHint; if (wHint == SWT.DEFAULT) width = composite.getBounds().width; if (hHint == SWT.DEFAULT) height = composite.getBounds().height; return new Point(width, height); } /* * (non-Javadoc) * * @see * org.eclipse.swt.widgets.Layout#layout(org.eclipse.swt.widgets.Composite, * boolean) * * Calculates the positions and sizes for the children of the passed * Composite, then places them accordingly by calling setBounds() on each * one. */ @Override protected void layout(Composite composite, boolean flushCache) { Control children[] = composite.getChildren(); for (int i = 0; i < children.length; i++) { calcedX = calcX(children[i]); calcedY = calcY(children[i]); calcedHeight = calcHeight(children[i]) - calcedY; calcedWidth = calcWidth(children[i]) - calcedX; if (composite instanceof Composite) { calcedX = calcedX - composite.getLocation().x; calcedY = calcedY - composite.getLocation().y; } children[i].setBounds(calcedX, calcedY, calcedWidth, calcedHeight); } } private int calcHeight(Control control) { int maximum = 0; if (control instanceof Composite) { if (((Composite) control).getChildren().length > 0) { for (Control child : ((Composite) control).getChildren()) { int calculatedHeight = calcHeight(child); if (calculatedHeight > maximum) { maximum = calculatedHeight; } } return maximum; } } return control.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).y + control.getLocation().y; } private int calcWidth(Control control) { int maximum = 0; if (control instanceof Composite) { if (((Composite) control).getChildren().length > 0) { for (Control child : ((Composite) control).getChildren()) { int calculatedWidth = calcWidth(child); if (calculatedWidth > maximum) { maximum = calculatedWidth; } } return maximum; } } return control.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x + control.getLocation().x; } private int calcX(Control control) { int minimum = Integer.MAX_VALUE; if (control instanceof Composite) { if (((Composite) control).getChildren().length > 0) { for (Control child : ((Composite) control).getChildren()) { int calculatedX = calcX(child); if (calculatedX < minimum) { minimum = calculatedX; } } return minimum; } } return control.getLocation().x; } private int calcY(Control control) { int minimum = Integer.MAX_VALUE; if (control instanceof Composite) { if (((Composite) control).getChildren().length > 0) { for (Control child : ((Composite) control).getChildren()) { int calculatedY = calcY(child); if (calculatedY < minimum) { minimum = calculatedY; } } return minimum; } } return control.getLocation().y; } } The problem with it is that it always positions the composite at the position (0,0). This is because it tries to change the absolute positioning into a relative one. Lets say I position a image at position (100,100) and one at (200,200). Then it has to calculate the location of the composite to be at (100,100) and spanning the one at (200,200). But as all child positions are relative to their parents I have to change the positions of the children to remove the 100px offset of the parent. When the layout gets updated it moves everything to the top-left corner (as seen in the image) because the position of the image is not (100,100) but (0,0) since I tried to remove the 100px offset of the partent. Where is my error in reasoning? Is this maybe a totally wrong approach? Is there maybe an other way to achive the desired behavior? Thanks in advance! Best regards, Ed

    Read the article

  • How to fix slow scrolling when using webkit-transform and relative positioning on the iphone

    - by BeWarned
    I have implemented scrolling of a div by using relative positioning and webkit animation for the iphone, it works beautifully on desktop safari but is choppy on the actual iphone (fine on the simulator). The scrolling works by having a div nested and clipped (overflow:hidden) by its parent. I then set the top position and animate it with -webkit style declarations. The iphone seems to noticeably slow down when there are a lot of items in the inner div. Any ideas how make the scrolling smoother? This was a problem with iScroll code and my own hand coded stuff.

    Read the article

  • javascript div positioning

    - by sam
    hello folks., please suggest me a solution.. i am using this script to display an image as popup on mouseover.. the difficulty i am facing is that it is not positioning well in different monitor.. it must be something to do with pixcel.. function LargeImage(obj,e) { var imgbtn=document.getElementById('<%=imgbtn1.ClientID%'); imgbtn.src=obj; document.getElementById('imgbox').style.visibility="visible"; document.getElementById('imgbox').style.position="absolute"; document.getElementById('imgbox').style.left=e.clientX-150 + "px"; document.getElementById('imgbox').style.top=225 +"px"; //225 +"px"; } thank you

    Read the article

  • SimpleModal bug when positioning HTML5 video

    - by digm
    I am trying to use simple modal to display a modal window containing a video. I'm using the HTML5 "video" tag to do this. Using JQuery and SimpleModal, I can get it working in Chrome and Firefox, but for some reason Safari fails to maintain the centered positioning of the modal dialog for the video. In other words, when you scroll up and down in the windows, the modal window stays in its place, but the video scrolls up and down with the rest of the content outside the window. I've put together a 29 line piece of HTML code that you can cut and paste to test. https://pastee.org/z5sw Anyone know what I can do to fix this? I've been trying for a few hours now and no combination of JQuery, SimpleModal, or CSS changes can seem to fix this. I'd appreciate any suggestions. Thanks in advance!

    Read the article

  • AutoCompleteExtender positioning menu incorrectly when scrolled

    - by Colin
    We have an AutoCompleteExtender linked to a TextBox. Both controls are placed inside an UpdatePanel, and the UpdatePanel is displayed as a pop-up dialog using a Javascript library (Ext.BasicDialog). The pop-up is a div on the page, not a separate window. The problem is that when the user scrolls inside the pop-up, the AutoCompleteExtender shows its menu in the wrong place. It looks like it is taking the visible distance from the top of the popup and positioning the menu from the top of the inner html of the popup (which is not visible) We are using Version 1.0.20229.20821 of the AjaxControlToolkit, and we are targetting ASP.NET Framework vewrsion 2.0. I have tried to fix the menu by attaching the following Javascript to the OnClientShown event, but it pretty much does the same thing: function resetPosition(object, args) { var tb = object._element; // tb is the associated textbox. var offset = $('#' + tb.id).offset(); var ex = object._completionListElement; if (ex) { $('#' + ex.id).offset(offset); } }

    Read the article

  • Element Positioning affected by Browser Screen Resolution Change

    - by Ed
    Hello, newbie developer here. There's this small problem I always encounter. Every time I try to change browser resolution (or what do you call the event when you scroll the mouse wheel while pressing ctrl), some elements (Mostly form elements) get to be shifted down or somewhere else, which does not conform with the original positioning. Im not sure if the problem is with the CSS or the markup itself and Im not really sure if this is much of a problem. Should I ignore it? (It doesn't feel very comfortable though, thinking that it might become problematic in the near future) Otherwise, any solution on how to avoid this? Simple explanations are very much appreciated, Thanks. (Perhaps the used term newbie should be replaced with noob?. Haha.)

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >