Search Results

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

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

  • JavaScript (SVG drawing): Positioning x amount of points in an area

    - by Jack
    I'm using http://raphaeljs.com/ to try and draw multiple small circles. The problem I'm having is that the canvas has a fixed width, and if I want to draw, say, 1000 circles, they don't wrap onto a 'new line' (because you have to specify the xy position of each circle). E.g. I want this: .................................................. to look like this: ............................ ...................... At the moment I'm doing this: for ( var i = 0; i < 1000; i++ ) { var multiplier = i*3; if ( i <= 50 ) { paper.circle((2*multiplier),2,2); } else if ( i >= 51 && i <= 101 ) { paper.circle((2*multiplier) - 304,8,2); } else if ( i >= 152 && i <= 202 ) { paper.circle((2*multiplier) - 910,14,2); } } For reference: circle(x co-ord, y co-ord, radius) This is messy. I have to add an if statement for every new line I want. Must be a better way of doing it..?

    Read the article

  • JQuery UI popup elements not positioning correctly

    - by Okku
    I am using both JQuery UI Dialog and JQuery UI autocomplete both have the same erroneous behavior when they popup, the position is always 0,0! I have tried some different position arguments when popping up the dialog but non seems to help. Any clues? Is this a bug in the position calculation in JQuery? Or is this some css bug? Versions are 1.4.2 and 1.8.0

    Read the article

  • Box2dWeb positioning relative to HTML5 Canvas

    - by Joe
    I'm new with HTML5 canvas and Box2DWeb and I'm trying to make an Asteroids game. So far I think I'm doing okay, but one thing I'm struggling to comprehend is how positioning works in relation to the canvas. I understand that Box2DWeb is only made to deal with physical simulation, but I don't know how to deal with positioning on the canvas. The canvas is 100% viewport and thus can vary size. I want to fill the screen with some asteroids, but if I hardcore certain values such as bodyDef.position.x = Math.random() * 50; the asteroid may appear off canvas for someone with a smaller screen? Can anybody help me understand how I can deal with relative positioning on the canvas?

    Read the article

  • Absolute positioning error in IE6 with dropdown list

    - by Brisbe42
    I have a div, that I'm using JavaScript to position, so that when someone hovers over an image, it displays a tooltip message that follows along with the pointer. (Using tooltip-0.2.js ) The problem is that when a user goes to the page in IE6, a disabled dropdown box on the page is showing through this absolutely positioned tooltip when it tries to hover over it. How can I get this dropdownlist to know its proper place? ;)

    Read the article

  • CSS positioning div above another div when not in that order in the HTML

    - by devmode
    Given a template where the HTML cannot be modified because of other requirements, how is it possible to display a div above another div when they are not in that order in the HTML and both divs contain data that could produce a varying height and width. HTML: <div id="wrapper"     <div id="firstDiv"         Content to be below in this situation     </div     <div id="secondDiv"         Content to be above in this situation     </div </div Other elements Hopefully it is obvious that the desired result is: Content to be above in this situation Content to be below in this situation Other elements When the dimensions are fixed it easy to position them where needed, but I need some ideas for when the content is variable. For the sake of this scenario, please just consider the width to be 100% on both. Edit: A CSS solution is the most ideal solution. Thank you for the Javascript options mentioned. Without getting too wordy about what or why (or who) ... I am specifically looking for a CSS only solution (and it will probably have to be met with other solutions if that doesn't pan out). One more ... there are other elements following this. A good suggestion was mentioned given the limited scenario I demonstrated -- given that it might be the best answer, but I am looking to also make sure elements following this aren't impacted.

    Read the article

  • CSS - Positioning images next to text

    - by jpjoki
    Hi, I'm doing a site in which images need to presented next to textual content - a sort of pseudo two-column layout, as the images and text come from a single html source. I've found quite a simple way to do this by putting the images as their own paragraphs and floating them. Would there still be a more simpler way (in regards to html) to do this without these extra paragraphs and by only attributing extra css to images? If the floated image is in the same paragraph than the text, then paragraphs with and without images would be different in width. EDIT: Basically, I'm looking for as simple HTML markup as possible to position images like this. The CSS can be complex ;) CSS: p { width: 500px; } p.image { float: right; width: 900px; } Current HTML: <p class="image"><img src="image.jpg" /></p> <p>Some text here.</p> Is the above possible with this HTML? <p><img src="image.jpg" /></p>

    Read the article

  • 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

  • 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

  • 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

  • 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

  • smart page resizing

    - by Anton
    Suppose I have an HTML page with three blocks of fixed width (their height can vary if that's important), like shown on picture: I would like to make it behave as shown on next picture: when browser screen width is reduced so it can't fit all three blocks in one line, first block goes down. Is it possible to achieve such behavior? Preferably with CSS only but any working solution would be great.

    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

  • VWD 2008 Express : where can i set absolute positioning as a default?

    - by Justin
    So when I used Visual Web Developer 2005 Express edition, in the ribbon there was a menu option for "Layout", which you could go through and select positioning and set absolute to default. I am using Visual Web Developer 2008 Express now, and I see that you can select format from the menu bar, and set position absolute, for each individual control that you add to the design surface, but is there a place I can just set absolute as the default, like in 2005? Thanks, Justin

    Read the article

  • Enable real fixed positioning on Samsung Android browsers

    - by Mr. Shiny and New ??
    The Android browser, since 2.2, supports fixed positioning, at least under certain circumstances such as when scaling is turned off. I have a simple HTML file with no JS, but the fixed positioning on three Samsung phones I've tried is simply wrong. Instead of true fixed positioning, the header scrolls out of view then pops back into place after the scrolling is done. This doesn't happen on the Android SDK emulator for any configuration I've tested (2.2, 2.3, 2.3 x86, 4.0.4). It also doesn't happen when using the WebView in an app on the Samsung phones: in those cases the positioning works as expected. Is there a way to make the Samsung Android "stock" browser use real fixed positioning? I've tested: 1. Samsung Galaxy 551, Android 2.2 2. Samsung Galaxy S, Android 2.3 3. Samsung Galaxy S II, Android 2.3 Sample code: <html> <head> <meta name="viewport" content="initial-scale=1.0,maximum-scale=1.0,user-scalable=no,width=device-width,height=device-height"> <style> h1 { position: fixed; top: 0; left: 0; height: 32px; background-color: #CDCDCD; color: black; font-size: 32px; line-height: 32px; padding: 2px; width: 100%; margin: 0;} p { margin-top: 36px; } </style> </head> <body> <h1>Header</h1> <p>Long text goes here</p> </body> </html> The expected behaviour is that the grey header fills the top of the screen and stays put no matter how much you scroll. On Samsung Android browsers it seems to scroll out of view then pop back into place once the scrolling is done, as if the fixed-positioning is being simulated using Javascript, which it isn't. Edit Judging by the comments and "answers" it seems that maybe I wasn't clear on what I need. I am looking for a meta tag or css rule/hack or javascript toggle which turns off Samsung's broken fixed-positioning and turns on the Android browser's working fixed-positioning. I am not looking for a Javascript solution that adds broken fixed-positioning to a browser that has no support whatsoever; the Samsung fixed-positioning does that already, it just looks stupid.

    Read the article

  • Commands don't have permission when using absolute path

    - by Markos
    I have folders set up this way: /srv/samba/video getfacl /srv/samba/video # file: srv/samba/video # owner: root # group: nogroup user::rwx group::--- group:sambaclients:rwx group:deluge:rwx mask::rwx other::--- default:user::rwx default:group::--- default:group:sambaclients:rwx default:group:deluge:rwx default:mask::rwx default:other::--- That means, user deluge has rwx to folder /srv/samba/video. However, when running command as user deluge, I am getting weird permission errors. When in folder /srv/samba/video: sudo -u deluge mkdir foo works flawlessly. But when using absolute path: sudo -u deluge mkdir /srv/samba/video/foo I am getting permission denied. When running sudo -u deluge id, I get output uid=113(deluge) gid=124(deluge) skupiny=124(deluge) which shows that user deluge is indeed in group deluge. Also, the behavior was the same when I gave the permissions also to user deluge not just group deluge. When executing as non-system user, it does work. The reason that I want to use absolute paths is that I am using automatically triggered post-download script which extracts some files into the folder. I have spent way too many hours to solve this problem myself. mkdir isn't the only command that fails, touch is doing the same thing, so I suspect that it's not mkdir's fault. If you need more info, I will try to put it in here, just ask. Thanx in advance. Edit: It seems that the root of the problem is acl set on perent folder /srv/samba, which indeed does not grant permissions to deluge (but neither denies it). getfacl /srv/samba # file: srv/samba # owner: root # group: nogroup user::rwx group::--- group:sambaclients:rwx mask::rwx other::--- default:user::rwx default:group::--- default:group:sambaclients:rwx default:mask::rwx default:other::--- If I grant the permission also to this folder, it suddenly starts to work so I believe that the acl on /srv/samba is somehow denying the permissions to deluge. So the question is: how do I set acl to both /srv/samba and /srv/samba/video so that sambaclients have access to whole /srv/samba and subdirectories and deluge has access only to /srv/samba/video and subdirectories?

    Read the article

  • CSS practices: negative positioning

    - by Corey
    I'm somewhat of a novice to CSS. Anyway, I noticed that an extremely common method used in CSS is to have negative or off-screen positioning, whether it be to hide text or preload images or what have you. Even on SE sites, like StackOverflow and this website, have #hlogo a { text-indent: -999999em } set in their CSS. So I guess I have a few questions. is this valid CSS? or is it just a "hack"? are there downsides to doing things this way? why is this so common? aren't there better ways to hide content?

    Read the article

  • Algorithms for positioning rectangles evenly spaced with unknown connecting lines

    - by MacGyver
    I'm new to game development, but I'm trying to figure out a good algorithm for positioning rectangles (of any width and height) in a given surface area, and connecting them with any variation of lines. Two rectangles will never have more than one line connecting them. Where would I begin working on a problem like this? This is only a 2 dimensional surface. I read about graph theory, and it seems like this is a close representation of that. The rectangles would be considered a node, and the lines connecting them would be considered an edge in graph theory.

    Read the article

  • CSS: Why an input width:100% doesn't expand in an absolute box?

    - by Alessandro Vernet
    I have 2 inputs: they both have a width: 100%, and the second one is an absolute box: <!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> <style type="text/css"> #box1 { position: absolute } #box1 { background: #666 } input { width: 100% } </style> </head> <body> <form> <input type="text"> <div id="box1"> <input type="text"> </div> </form> </body> </html> On standard-compliant browsers, the width: 100% seems to have no effect on the input inside the absolutely positioned box, but it does on the input which is not inside that absolutely absolute box. On IE7, both inputs take the whole width of the page. Two questions come to mind: Why does the width: 100% have no effect with standard-compliant browsers? I have to say that the way IE7 renders this feels more intuitive to me. How can I get IE7 to render things like the other browsers, if I can't remove the width: 100% and can't set a width on the absolutely positioned box?

    Read the article

  • Receiving requests where absolute URL on page are morphed to relative URLs

    - by Jacob
    In our web pages, we have a hyperlink with an href to an absolute URL: https://some.other.host.com/blah.aspx?var1=val1&var2=val2 For some reason, in our logs, we see a lot of requests to URLs of this format: http://our.site.com/https:/some.other.host.com/blah.aspx?var1=val1&var2=val2 We don't have any JavaScript that would request that URL; it only appears inside of a hyperlink. Is there some sort of known bot, browser plugin, bug, etc. that could be responsible for these requests being made?

    Read the article

  • Coordinate and positioning problem on iOS with cocos2d-x

    - by Vexille
    I'm using cocos2d-x alongside with Marmalade and running some tests and tutorials before starting an actual project with them. So far things are working reasonably well on the windows simulator, Android and even on Blackberry's Playbook, but on iOS devices (iPhone and iPad) the positioning seems to be off. To make things clearer, I put together a scene that just draws an image in the middle of the screen. It worked as expected on everything else, but this is the result I got on an iPhone: To get the coordinates for the center of the screen I'm using the VisibleRect class from the TestCpp sample. It just uses sharedOpenGLView to get the visible size and visible origin, and calculate the center from that. CCSprite* test = CCSprite::create("Ball.png", CCRectMake(0, 0, 80, 80) ); test->setPosition( ccp(VisibleRect::center().x, VisibleRect::center().y) ); this->addChild(test); Also I have a noBorder policy set on AppDelegate: CCEGLView::sharedOpenGLView()->setDesignResolutionSize(designSize.width, designSize.height, kResolutionNoBorder); One funny thing is that I tried to deploy the TestCpp sample project to some iOS devices and it worked reasonably well on the iPhone, but on the iPad the application was only being drawn on a small portion of the screen - just like what happened on the iPhone when I tried using the ShowAll policy.

    Read the article

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