Search Results

Search found 3309 results on 133 pages for 'relative positioning'.

Page 4/133 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • positioning image using css

    - by TomBs
    hi, i really need to place an image somewhere in the page (100 pixels from the left side for example) but i want to control where the center of the image will be, when i use left:100px; , the image is positioned 100px from its left edge and not from its center... is there a way i can choose where the center of the image will be and not the left/right edge?

    Read the article

  • IE6 positioning issue

    - by Ralph The Mouf
    Here is the CSS...how can I make it layout as it should in IE6? .AuthorName_Pic { width:186px; position:absolute; right:0px; bottom:-120px; padding:20px 10px 20px 15px; margin:20px 0px 0px 0px; background:url(images/ThumbDark.jpg) no-repeat; z-index:100; }

    Read the article

  • css absolute positioning hidden scrollbars ... with a twist

    - by ScottE
    I'm working on a website that targets 1024 X 768 as the minimum resolution. So, we're at about 970px wide. Design came back with an interesting layout that has a centered site with a banner that actually exceeds this width (1288px to be exact) that will look good for users with greater resolution, but look fine at 1024. So, to prevent scrollbars from showing up for those at 1024 I positioned the banner absolutely and used overflow-x: hidden on the body. This works just fine across our target browsers. Now, the client has come back and asked for scrollbars to be present for users on 800 X 600 (yes, this is not the target) so they can see a critical login button. How can this be accommodated for those 2% of their users without making radical changes? All I can think of is to detect their screen width and remove the overflow-x:hidden. You have to love when requirements change late in the build process! Edit - here's what I have that seems simple enough to me - any caveats here? if (screen.width === 800) { $("body").css("overflow-x", "visible"); }

    Read the article

  • CSS Positioning Issues: Wordpress

    - by cam
    I'm following this tutorial here http://www.kriesi.at/archives/create-a-multilevel-dropdown-menu-with-css-and-improve-it-via-jquery on adding a menu with jquery. I've created my menu, but I'm having trouble adding it to wordpress. I opened up the header.php file since I want it to appear below the banner, and I paste it in it's own div, but it always "pushes" everything below it to the right. How do I stop it from doing this? Here's the code: <ul id="nav"> <li><a href="#">1 HTML</a></li> <li><a href="#">2 CSS</a></li> <li><a href="#">3 Javascript</a> <ul> <li><a href="#">3.1 jQuery</a> <ul> <li><a href="#">3.1.1 Download</a></li> <li><a href="#">3.1.2 Tutorial</a></li> </ul> </li> <li><a href="#">3.2 Mootools</a></li> <li><a href="#">3.3 Prototype</a></li> </ul> </li>

    Read the article

  • Different positioning in Firefox, Internet Explorer and Safari?

    - by Hristo
    Hello, I believe this question has been asked a lot of times, and I have managed to overcome this problem before whenever it occurred. Just now, I feel stuck with it and can't find a proper solution to make it work in all browsers: it does work properly only in Firefox, while in IE and Safari its elements are somehow apart from each other. You can see the result here: http://img813.imageshack.us/img813/8393/firefox.png http://img812.imageshack.us/img812/8041/10990669.png This is the code I use: http://pastebin.com/n6KEjazp Thank you very much in advance!

    Read the article

  • Finding a Relative Path in .NET

    - by Rick Strahl
    Here’s a nice and simple path utility that I’ve needed in a number of applications: I need to find a relative path based on a base path. So if I’m working in a folder called c:\temp\templates\ and I want to find a relative path for c:\temp\templates\subdir\test.txt I want to receive back subdir\test.txt. Or if I pass c:\ I want to get back ..\..\ – in other words always return a non-hardcoded path based on some other known directory. I’ve had a routine in my library that does this via some lengthy string parsing routines, but ran into some Uri processing today that made me realize that this code could be greatly simplified by using the System.Uri class instead. Here’s the simple static method: /// <summary> /// Returns a relative path string from a full path based on a base path /// provided. /// </summary> /// <param name="fullPath">The path to convert. Can be either a file or a directory</param> /// <param name="basePath">The base path on which relative processing is based. Should be a directory.</param> /// <returns> /// String of the relative path. /// /// Examples of returned values: /// test.txt, ..\test.txt, ..\..\..\test.txt, ., .., subdir\test.txt /// </returns> public static string GetRelativePath(string fullPath, string basePath ) { // ForceBasePath to a path if (!basePath.EndsWith("\\")) basePath += "\\"; Uri baseUri = new Uri(basePath); Uri fullUri = new Uri(fullPath); Uri relativeUri = baseUri.MakeRelativeUri(fullUri); // Uri's use forward slashes so convert back to backward slashes return relativeUri.ToString().Replace("/", "\\"); } You can then call it like this: string relPath = FileUtils.GetRelativePath("c:\temp\templates","c:\temp\templates\subdir\test.txt") It’s not exactly rocket science but it’s useful in many scenarios where you’re working with files based on an application base directory. Right now I’m working on a templating solution (using the Razor Engine) where templates live in a base directory and are supplied as relative paths to that base directory. Resolving these relative paths both ways is important in order to properly check for existance of files and their change status in this case. Not the kind of thing you use every day, but useful to remember.© Rick Strahl, West Wind Technologies, 2005-2010Posted in .NET  CSharp  

    Read the article

  • Xcode Link Frameworks "Relative to Current SDK" Doesn't Work When Mixing Mac Framework and iPhone St

    - by bl4th3rsk1t3
    I have a framework of code I maintain. It's got mac and iphone objective-c code. And some of it is shared. I'm not having any problems with code. It's a problem with Xcode. Let's just call my framework "AwesomeKit" for this problem. The first thing I did was create an xcode Framework project called "AwesomeKit". Add source files to it, link against the common mac frameworks: foundation, cocoa, carbon, etc. It compiles fine. Then, add a new "static library" target, let's call it "AwesomeKit-iPhone" and set the base SDK in the build settings to iphone device 3.1.3. The problem comes when I try to add "Existing Frameworks" to the AweseomKit-iPhone target. -First change the current build target to AwesomeKit-iPhone. -Right click on any group and select "Add Existing Frameworks..." -Choose UIKit.framework UIKit will immediately be highlighted red, as if it's missing. It is indeed missing because Xcode uses the "Relative SDK" setting from the "Mac OS 10.6" SDK. When it should be using it relative to the current target's base sdk iphone device 3.1.3. What the heck? Has anyone experienced this? This is really annoying.

    Read the article

  • Problem with relative path to image in XAML?

    - by Giri
    I am trying to reference a PNG file in my applications working directory through XAML with the following: <Image Name="contactImage"> <Image.Source> <BitmapImage UriSource="/Images/contact.png"> </Image.Source> </Image> Now in my code-behind I try to get the height of the image with contactImage.Source.Height This fails with System.IOException - cannot locate resource 'images/contact.png'. If I use something like PngBitmapDecoder p = new PngBitmapDecoder(new Uri("./Images/contact.png"), UriKind.Relative, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default); Everything is happy. How can I reference an image in xaml to a path relative to the working deirectory of the app. BTW- this is being run on a remote machine (if that makes a difference). I have tried "./Images/contact.png" and ".\Images\contact.png" and several other combinations of back/forward slashes and dots. Here is the primary difference- Any time the file is referenced in XAML, it shows up as pack://aplication:,,, blah blah blah when I use the PngBitmapDecoder, it shows up correctly as "./Images/contact.png". How do I reference the image file in XAML and get it show a source as "./Images/contact.png" instead of a pack://application,,,blah blah blah?

    Read the article

  • Convert a Relative URL to an Absolute URL in Actionscript / Flex

    - by Bear
    I am working with Flex, and I need to take a relative URL source property and convert it to an absolute URL before loading it. The specific case I am working with involves tweaking SoundEffect's load method. I need to determine if a file will be loaded from the local file system or over the network from looking at the source property, and the easiest way I've found to do this is to generate the absolute URL. I'm having trouble generating the absolute URL for sound effect in particular. Here were my initial thoughts, which haven't worked. Look for the DisplayObject that the Sound Effect targets, and use its loaderInfo property. The target is null when the SoundEffect loads, so this doesn't work. Look at FlexGlobals.topLevelApplication, at the url or loaderInfo properties. Neither of these are set, however. Look at the FlexGlobals.topLevelApplication.systemManager.loaderInfo. This was also not set. The SoundEffect.as code basically boils down to var url:String = "mySound.mp3"; /*>> I'd like to convert the URL to absolute form here and tweak it as necessary <<*/ var req:URLRequest = new URLRequest(url); var loader:Loader = new Loader(); loader.load(req); Does anyone know how to do this? Any help clarifying the rules of how relative urls are resolved for URLRequests in ActionScript would also be much appreciated. edit I would also be perfectly satisfied with some way to tell whether the url will be loaded from the local file system or over the network. Looking at an absolute URL it would just be easy to look at the prefix, like file:// or http://.

    Read the article

  • NAnt exec relative path

    - by stacker
    How can I assign to trunk.dir property a relative path to the trunk location? This is my nant.build file: <?xml version="1.0" encoding="utf-8"?> <project name="ProjectName" default="build" xmlns="http://nant.sf.net/release/0.85/nant.xsd"> <!-- Directories --> <property name="trunk.dir" value="C:\Projects\ProjectName" /><!-- I want relative path over here! --> <property name="source.dir" value="${trunk.dir}src\" /> <!-- Working Files --> <property name="msbuild.exe" value="C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" /> <property name="solution.sln" value="${source.dir}ProjectName.sln" /> <!-- Called Externally --> <target name="compile"> <!-- Rebuild foces msbuild to clean and build --> <exec program="${msbuild.exe}" commandline="${solution.sln} /t:Rebuild /v:q" /> </target> </project>

    Read the article

  • NAnt and relative path execution

    - by stacker
    How can I assign to trunk.dir property a relative path to the trunk location? This is my nant.build file: <?xml version="1.0" encoding="utf-8"?> <project name="ProjectName" default="build" xmlns="http://nant.sf.net/release/0.85/nant.xsd"> <!-- Directories --> <property name="trunk.dir" value="C:\Projects\ProjectName" /><!-- I want relative path over here! --> <property name="source.dir" value="${trunk.dir}src\" /> <!-- Working Files --> <property name="msbuild.exe" value="C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" /> <property name="solution.sln" value="${source.dir}ProjectName.sln" /> <!-- Called Externally --> <target name="compile"> <!-- Rebuild foces msbuild to clean and build --> <exec program="${msbuild.exe}" commandline="${solution.sln} /t:Rebuild /v:q" /> </target> </project>

    Read the article

  • PHP convert external relative path to absolute path

    - by CMC
    Hello, I am trying to figure out how to convert an "external relative path" to an absolute one: I'd really like a function that will do the following: $path = "/search?q=query"; $host = "http://google.com"; $abspath = reltoabs($host, $path); And have $abspath equal to "http://google.com/search?q=query" The problem is that it is not guaranteed to be in that format, and it could already be absolute, or be pointing to a different host entirely, and I'm not quite sure how to approach this. Thanks.

    Read the article

  • g++ compiler complains about conversions between relative types (from int to enum, from void* to cla

    - by Slav
    g++ compiler complains about conversions between relative types (from int to enum, from void* to class*, from const char* to unsigned char*, etc.). Compiler handles such convertions as errors and won't compile furthermore. It occurs only when I compile using Dev-C++ IDE, but when I compile the same code (using the compiler which Dev-C++ uses) such errors (even warnings) do not appears. How to mute errors of such types?

    Read the article

  • Overlapping two divs and 'clearing' their parent div

    - by brady8
    My CSS-fu is letting me down here: What I'd like to do is position two child divs to be overlapping: Using position: absolute; top: 0px; left: 0px; is the only way I know how, with the parent set to position: relative. The problem with this is that the child divs are taken out of the layout as per the CSS spec, shrinking the parent div to height: 0px, so that I can't clear that div and put any content below. My amazing ASCII art below details what I'm going for... any ideas? As an aside, I need these divs to be overlapping exactly for jQuery fades, and maybe trying out some of the new Webkit transforms, a la Apple's cardflip demo: http://developer.apple.com/safari/library/samplecode/CardFlip/Introduction/Intro.html If there's another way to get them overlapped exactly in CSS, I'm all ears. Thanks! |-------------------------------------------------| | Parent div | | |-------------------------------------------| | | | | | | | DIVS 1 & 2 (overlapped) | | | | | | | |-------------------------------------------| | |-------------------------------------------------| ...more content below, after clearing the parent...

    Read the article

  • letting absoltuely positioned area grow

    - by JCHASE11
    Please see this page for reference: test page I am designing a site that has a sidebar that contains an accordion style vertical nav bar. The sidebar which contains this accordion is absolutely positioned, relative to the container that holds it. I did this so the sidebar would stay sticky to the top, bottom, and side. When you click the products button, the accordion expands well past the container, overflowing into the footer. If I floated the sidebar to the left, it would grow to accommodate the entire sidebar, but it wouldn't be sticky to the bottom of the container by default. I need a solution that allows the sidebar to be absolutely positioned, and allow growth if the accordion expands. Any Ideas? Jquery solution perhaps?

    Read the article

  • SEO Website Positioning and History of Search Engines

    In this article I want to discuss about these main points: the evolution of methods of positioning SEO, the positioning strategy of the site, the placement site in terms of investments. A brief history of modern search engines and the introduction of sophisticated indexing techniques that produce results with higher quality will be shown in this article.

    Read the article

  • Mapping Absolute / Relative (Local) Paths to Absolute URLs

    - by Alix Axel
    I need a fast and reliable way to map an absolute or relative local path (say ./images/Mafalda.jpg) to it's corresponding absolute URL, so far I've managed to come up with this: function Path($path) { if (file_exists($path) === true) { return rtrim(str_replace('\\', '/', realpath($path)), '/') . (is_dir($path) ? '/' : ''); } return false; } function URL($path) { $path = Path($path); if ($path !== false) { return str_replace($_SERVER['DOCUMENT_ROOT'], getservbyport($_SERVER['SERVER_PORT'], 'tcp') . '://' . $_SERVER['HTTP_HOST'], $path); } return false; } URL('./images/Mafalda.jpg'); // http://domain.com/images/Mafalda.jpg Seems to be working as expected, but since this is a critical feature to my app I want to ask if anyone can spot any problem that I might have missed and optimizations are also welcome since I'm going to use this function several times per each request.

    Read the article

  • php mkdir windows relative path

    - by Vish
    Hi, Want to create a directory on windows from a PHP script. My script is in www/Test directory of Apache and want to create a folder(fold1) inside www/downloads directory. Inside the script, using, $dirName = "../downloads/fold1"; mkdir("{$dirName}"); If we use the full path of dirName like C:\Apache\www\downloads\fold1, it works fine. But want to use relative path since this code will be sent to the client. Please let me know. Thanks, Vish.

    Read the article

  • Relative to absolute paths in HTML (asp.net)

    - by Jo Asakura
    Hello all, I need to create a newsletters by URL. I to do next: Create a WebClient; Use WebClient's method DownloadData to get a source of page in byte array; Get string from source-html byte array and set it to the newsletter content. But I have some troubles with paths. All elements' sources were relative (/img/welcome.png) but I need absolute (http://www.mysite.com/img/welcome.png). How can I do this? Best regards, Alex.

    Read the article

  • Can FileOutputStream() take a relative path as an argument

    - by Ankur
    I am creating a FileOutputStream object. It takes a file or String as an argument in its constructor. My question is, can I give it a relative URL as an argument for the location of a file, it doesn't seem to work, but I am trying to work out if this is possible at all (if not I will stop trying). If it is not possible, how can I (from a servlet) get the absolute path (on the filesystem, not the logical URL) to the current location in such a way that I can pass that to the constructor. Part of my problem is that my dev box is Windows but I will publish this to a Unix box, so the paths cannot be the same i.e. on Windows C:/.... and on unix /usr/...

    Read the article

  • PHP: producing relative date/time from timestamps

    - by KeyStroke
    Hi, I'm basically trying to convert a Unix timestamp (the time() function) to a relative date/time that's both compatible with past and future date. So outputs could be: 2 weeks ago 1 hour and 60 minutes ago 15 minutes and 54 seconds ago after 10 minutes and 15 seconds First I tried to code this, but made a huge unmaintainable function, and then I searched the internet for a couple of hours, yet all I can find are scripts that produce only one part of the time (e.h: "1 hour ago" without the minutes). Do you have a script that already does this? If so, I'd really appreciate if you could share it. Thanks.

    Read the article

  • Java - Loading dlls by a relative path and hide them inside a jar

    - by supertreta
    Hi guys, I am developing a Java application that should be release as a jar. This program depends on c++ external libraries called by JNI. To load them, I use the method System.load with an absolute path and this works fine. However, I really want to "hide" them inside the jar, so I have created a package to collect them. This forces me to load an relative path - the package path. By this approach, I let the user run the jar in any directory, without being worried about linking the dll's or bored with a previous installation process. This throws the expected exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library How can I get this working? Thanks for your help!

    Read the article

  • Creating a relative path to a Database in Asp.net for a library

    - by Greener
    In school I am part of a team of four working to create a GUI to translate the paper records of a made-up company and their functionality to a digital format. We're using an ASP.NET website for this purpose. Basically we use stored procedures and C# classes to represent the database. The folder we're using for the project contains the site and the libraries in separate folders. If I try to open the site from the folder containing both these elements the site will not run. I want to know if there is some way I can set up a relative path to the database in the Settings.Settings.cs file (or by some other means) of my libraries so I don't have to constantly change the database location for the connection string value every time we move the project. I suppose I should also mention that the database is in an App_Data folder.

    Read the article

  • Relative path from an ASP.NET user control NavigateUrl

    - by Daniel Ballinger
    I have a user control that contains a GridView. The GridView has both a HyperLinkField column and a template column that contains a HyperLink control. The ASP.NET project is structured as follows, with the Default.aspx page in each case using the user control. Application Root Controls UserControl with GridView SystemAdminFolder Default.aspx Edit.aspx OrganisationAdminFolder Default.aspx Edit.aspx StandardUserFolder Default.aspx Edit.aspx Note: The folders are being used to ensure the user has the correct role. I need to be able to set the DataNavigateUrlFormatString for the HyperLinkField and the NavigateUrl for the HyperLink to resolve to the Edit.aspx page in the corresponding folder. If I set the navigate URL to "Edit.aspx" the URL in the browser appears as 'http://Application Root/Controls/Edit.aspx' regardless of the originating directory. I can't use the Web application root operator (~/) as the path needs to be relative to the current page, not the application root. How can I use the same user control in multiple folders and resolve the URL to another page in the same folder? Note: The question is strongly based off a similar question by azhar2000s on the asp.net forums that matches my problem.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >