Search Results

Search found 11623 results on 465 pages for 'css positioning'.

Page 19/465 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • Can't Prevent Nested Div's from Overflowing when using Percent Sizes and Padding in CSS?

    - by viatropos
    I want to be able to layout nested divs with these properties: width: 100% height: 100% padding: 10px I want it to be such that, the children are 100% width and height of the remaining space after padding is calculated, not before. Otherwise, when I have a document like the below example, the child makes the scrollbars appear. But the scrollbars are not the main issue, the fact that the child stretches beyond the width of the parent container is. I can use all position: absolute declarations, but that doesn't seem right. Here is the code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=7"> <title>Liquid Layout</title> <style> body, html { width:100%; height:100%; margin:0; padding:0; background-color:black; } #container { position:relative; width:100%; height:100%; background-color:red; opacity:0.7; } #child1 { position:relative; width:100%; height:100%; padding:10px; background-color:blue; } #nested1 { position:relative; background-color: white; width:100%; height:100%; } </style> </head> <body> <div id="container"> <div id="child1"> <div id="nested1"></div> </div> </div> </body> </html> How do I make it so, using position:relative or position:static, and percent sizes, the percents size the children according to the parent's width/height minus padding and margins? Do I have to resort to position:absolute and left/right/top/bottom? Thanks for the help, Lance

    Read the article

  • CSS - 2 divs side-by-side, one floated - how do I make the other fit next to it without overlapping?

    - by Artem Russakovskii
    I have had the following problem for a while and I am really not sure how to solve it. The problem can currently be observed here: http://www.androidpolice.com/2009/11/16/the-not-so-good-the-bad-and-the-ugly-my-list-of-20-problems-with-htc-hero/ - feel free to use this for Firebugging. There are 2 notions here: a table of contents (toc) and notes. A note usually takes 100% of the post width and everything is fine. However, when a note appears next to a toc, the toc starts overlapping and covering the note (I set z-index:1 on the toc because otherwise the note covered it, which was even worse). It's interesting to point out that the text of the note doesn't get covered by the toc - only the note div itself does. In IE7, it's even worse - the note div jumps down to under the toc and leaves a lot of empty space (2nd screenshot). So, how can I solve this? The ideal solution would have the note div occupy 100% of the visible space - i.e. it would resize itself to fit right next to the toc when needed. Any points appreciated. Thank you! Here are some screenshots for future reference: in IE7:

    Read the article

  • What is the method of choice to adjust CSS changes in vaadin?

    - by Karussell
    I am struggling with some minor layout changes in vaadin which has to be done on Java AND Css side. Everytime I need to adjust a layout thing like padding-top, background color or bold text of one component I need to set the style via Java code too: userLink.setStyleName("textbold"); The changes in my styles.css (under VAADIN/themes/app/) would then be: @import "../runo/styles.css"; .textbold { font-weight: bold; } ... Is this the correct way of changing the CSS or is there another way? Can I do this without affecting the Java code?

    Read the article

  • CSS div positioning assistance

    - by bikey77
    I need some help with the positioning of divs that appear on each #box's hover event. The hidden divs should appear over the box that was hovered in a way that: Each #tooltip div covers the box that was hovered plus the box next to it The tooltips of boxes 1 & 2 should cover the boxes to the right #tooltips for box 3 & 4 should cover the boxes to their left (to make it more understandable, please see the attached image There will be several rows of boxes so positioning should be relative and not fixed to the page dimensions (i suppose) So far I haven't managed to get the #tooltip positionings right (I know that one should be absolute and the other relative but no matter my efforts, I haven't nailed it yet). Here's a jsfiddle to work on and this is the result i'm after:

    Read the article

  • Why can't I put a jquery-ui progressbar inside a div with fixed position?

    - by Matthew
    I started the source from this progressbar example, and it works fine. My only change was to set the width of the progressbar to "20%". <!DOCTYPE html> <html> <head> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> <script> $(document).ready(function() { $("#progressbar").progressbar({ value: 37 }).css({ width : "20%"}); }); </script> </head> <body style="font-size:62.5%;"> <div id="progressbar"></div> </body> </html> I then put the progressbar inside another div, and used css to fix that div in the upper-right-hand corner. <!DOCTYPE html> <html> <head> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> <style type="text/css"> #testContainer { position : fixed; top : 6; right : 6; } </style> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> <script> $(document).ready(function() { $("#progressbar").progressbar({ value: 37 }).css({ width : "20%"}); }); </script> </head> <body style="font-size:62.5%;"> <div id="testContainer"> <div id="progressbar"></div> </div> </body> </html> The progressbar becomes a slim vertical line on the left side of the screen. What am I doing wrong? I'm new to web development in general, and jquery in particular, so please forgive me if this is a stupid question.

    Read the article

  • CSS/Jquery How can I display a div directly under button?

    - by user342391
    I have a button that when hovered displays a div. How can I postion this div to appear directly under the button when displayed??? <script type="text/javascript"> $(document).ready(function(){ $(".plans").hover(function() { $("#planssubnav").show("slow"); }, function(){ $("#planssubnav").hide("slow"); }); }); </script> <a href="/plans" style="font-size:14px;" class="plans fg-button fg-button-icon-right ui-state-default ui-corner-all"><span class="ui-icon ui-icon-circle-triangle-s"></span>Plans</a> <div id="planssubnav" style="display:none"> <h1> content</h1> </div>

    Read the article

  • CSS: Is it possible to have a 3-column layout with BOTH the left column and center column flexibly filling the space?

    - by Steven Lu
    It is possible to use position:absolute and left and right on the middle column to set where it ends in relation to the parent div. However I'd like to be able to have the left side of the center div to start right where the left column ends, and for the left column to be adjustable (based on its content). This seems like a really basic thing but from what I understand there is no way to do this without flexboxes. Is this true? Is there nothing I could do with clever nesting of semantically superfluous elements and certain styles set to auto?

    Read the article

  • jQuery Tooltip positioning issues

    - by Nimbuz
    HTML: <a href="#" rel="tooltip-1">Open Tooltip</a> <div id="tooltip-1">Tooltip Content</div> jQuery: xOffset = $('#tooltip-1').height() + 10; yOffset = -30 ; $("a[rel=tooltip-1]").hover(function(e){ this.t = this.attr("href"); $("body").append("<p id='tooltip'>"+ this.t +"</p>"); $("#tooltip") .css("top",(e.pageY - xOffset) + "px") .css("left",(e.pageX + yOffset) + "px") .fadeIn("fast"); }, function(){ this.t = ""; $("#tooltip").remove(); }); $("a[rel=tooltip-1]").mousemove(function(e){ $("#tooltip-1") .css("top",(e.pageY - xOffset) + "px") .css("left",(e.pageX + yOffset) + "px"); }); Two Issues: Tooltip div (#tooltip-1) doesn't hide on mouseout. Since the tooltip div will always have the same ID as REL, I'd like to modify the above jQuery so that it takes target DIV ID automatically. Thanks in advance for your help.

    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

  • Remove redundant CSS rules

    - by ken
    I have several CSS files all being used in a large application; most are legacy, with one "main" css file that is the most current. This setup came about after a rebranding, and instead of redoing all of the CSS, we simply added a new CSS file that would override the rules from the legacy files. So now, I'd like to distill all of this CSS (1000's of lines) into 1 file. NOTE: I don't want to simply combine the files (as in copy/pasting them all into 1 file); I need an application to semi-intelligently look at the rules, reduce them down to only the effective rules (after inheritance), but I can't find anything like that. Example; given: /* legacy.css */ .foo { color: red; margin: 5px; } ..and: /* current.css */ .foo { margin: 10px; } I need a tool to output: /* result.css */ .foo { color: red; margin: 10px; } Does such an application exist?

    Read the article

  • css file not getting updated

    - by fusion
    the font of the content of my facebook app keeps getting italicized even when i've removed the italics from the css file. if i make minor changes in the css file and upload it to the server, the firebug shows the unedited previous css file and hence, the app keeps showing unformatted content. what exactly is going wrong here? i made a new css file and copied the contents of the previous css exactly as it was, and i linked it in all the files which require css. but when i upload these files to the server, facebook canvas doesn't show any css at all. i replaced the css filename with the previous one, and it works. why is this?

    Read the article

  • I can't load the css files

    - by mfalcon
    I want to load some .css files to my Django project but I don't know why they aren't loaded. The css files are located at "/myproject/media/css". settings.py: import os.path PROJECT_DIR = os.path.dirname(__file__) MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media') urls.py: from django.conf import settings ... (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}), ) base.html: <link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_ROOT }}css/myStyle.css" />

    Read the article

  • Django template can't see CSS files

    - by Technical Bard
    I'm building a django app and I can't get the templates to see the CSS files... My settings.py file looks like: MEDIA_ROOT = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'media') MEDIA_URL = '/media/' I've got the CSS files in /mysite/media/css/ and the template code contains: <link rel="stylesheet" type="text/css" href="/media/css/site_base.css" />` then, in the url.py file I have: # DEVELOPMENT ONLY (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '/media'}), but the development server serves the plain html (without styles). What am I doing wrong?

    Read the article

  • GZipping CSS and JS files

    - by Ryan Giglio
    I'm using YSlow to improve the speed of my site, and I'm having trouble with the "compress components with gzip" grade. I have this in my .htaccess file: SetOutputFilter DEFLATE AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript But YSlow is saying There are 4 plain text components that should be sent compressed * http://crewinyourcode.com/css/reset.css * http://crewinyourcode.com/css/inner-pages/index.css * http://crewinyourcode.com/script/css/jquery-ui-1.8.custom.css * http://crewinyourcode.com/js/inner-pages/index.js How can I gzip the css and js files? Also...I don't have access to the httpd.conf file.

    Read the article

  • CSS refuse to obey

    - by Frank
    Hi, I'll make this short, I got this webpage : <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="Stylesheet" type="text/css" href="css/style.css" /> <link rel="Stylesheet" type="text/css" href="css/nav.css" /> </head> <body> <div id="header"> <ul id="navList"> <li><a href="#" id="navActive">foo</a></li> <li><a href="#">bar</a></li> </ul> </div> </body> </html> With this CSS style.css body { padding:0; margin:0; background-color:#000000; background-repeat:no-repeat; background-image:url('../img/bg.jpg'); } nav.css #navList { padding:0; margin:0; background-image:url('../img/menu.png'); list-style-type:none; padding:12px 150px; } #navList li { display:inline; } #navList li a { color:#bfbfbf; padding:14px 25px; text-decoration:none; } #navList li a:hover { color:#000000; background-color:#bfbfbf; text-decoration:none; } #navActive { color:#000000; background-color:#bfbfbf; } It looks like the CSS from the navActive id is never being applied... Could someone tell me why and/or suggest me a way to correct this. Thanks.

    Read the article

  • Slideshows in elastic or fluid layouts?

    - by aendrew
    Hi folks, I'm building a new WordPress TwentyTen child theme using the ElastiCSS framework ( http://elasticss.com/ ) and am trying to figure out the best way of using some sort of dynamic content slideshow. What is the best way to implement a slideshow in a fluid or elastic layout such that it remains proportional to the other items in the content area? Should I even bother trying to obtain that? Or should I use like four different sizes in conjunction with something like the Less framework ( http://lessframework.com/ )? Thanks! (BTW, I've posted here because this was more of a "what's the best option" question than a "How do I program that?" question. If you think it would be more appropriate on SO, please move it there.)

    Read the article

  • Pyramind of DIVs

    - by sebastian
    Hi there, I'm trying to build a pyramid that's made of 4 DIVs. The layout looks like this: ------ | #1 | ------ ---------------- | #2 | #3 | #4 | ---------------- Moreover I need 3 additional DIVs starting at the center DIV (#3) and containing either #1, #2 or #3 additionally. These DIVs are used the build a sliding effect with jQueryUI later on. It's supposed to look like #1, #2 and #4 slide out of #3. The margin between the DIVs is supposed to be 2 pixels. I also want the whole block to be centered. Even with display: inline; and position: absolute; enabled on the visible and invisible DIVs I can't get the layout right. I used some negative margins and when it looked ok for the first time I saw that my top DIV was positioned outside of the html body. I suppose there is a more simple and elegant way to achieve what I want. Thanks in advance Sebastian Here's what I've got so far: HTML: <div id="centerbox"> <div id="main">main</div> <div id="rail_top"> <div id="top">top</div> </div> <div id="rail_left"> <div id="left">left</div> </div> <div id="rail_right"> <div id="right">right</div> </div> </div> CSS: #centerbox { height: 602px; width: 904px; margin-top: 640px; margin-left: auto; margin-right: auto; } /* blue */ #main { background-color: #33F; height: 300px; width: 300px; margin: 2px; z-index: 9999; position: absolute; display: inline; margin-left: 302px; } /* green */ #top { background-color: #3F0; height: 300px; width: 300px; z-index: 1; position: absolute; display: inline; } /* pink */ #left { background-color: #F06; height: 300px; width: 300px; z-index: 1; } /* orange */ #right { background-color: #FC0; height: 300px; width: 300px; z-index: 1; margin-left: 302px; } #rail_top { height: 602px; width: 300px; display: inline; position: absolute; margin-top: -300px; margin-left: 302px; } #rail_left { height: 300px; width: 602px; float: left; position: absolute; display: inline; margin-top: 2px; } #rail_right { height: 300px; width: 602px; float: right; position: absolute; display: inline; margin-left: 302px; margin-top: 2px; }

    Read the article

  • How do the performance characteristics of jQuery selectors differ from those of CSS selectors?

    - by Moss
    I came across Google's Page Speed add-on for Firebug yesterday. The page about using efficient CSS selectors said to not use overqualified selectors, i.e. use #foo instead of div#foo. I thought the latter would be faster but Google's saying otherwise, and who am I to go against that? So that got me wondering if the same applied to jQuery selectors. This page I found the link to on SO says I should use $("div#foo"), which is what I was doing all along, since I thought that things would speed up by limiting the selector to match div elements only. But is it really better than writing $("#foo") like Google's saying for CSS selectors, or do CSS versus jQuery element matching work in different ways and I should stick with $("div#foo")?

    Read the article

  • Javscript: creating div with absolute positioning

    - by citricsquid
    Hi, Just wondering if there's a way to position a div with absolute so that it ignores EVERYTHING else, if my site clears floats it seems divs that are created with javascript and absolute positioning are still effected by it, is there any way to make them ignore EVERYTHING else and go exactly where I set them, regardless?

    Read the article

  • Simple Tableless Positioning issue: Trying to float Div right on same line

    - by MrEnder
    Ok I just started a template for a website http://clickforclicks.com/design1/ I'm trying to make it tableless. Notice I have a red div along the side. I tried to get one on the otherside aswell that looked the same. But when I do it. It goes to a new line =[ How might I get this effect without using Javascript or Absolute positioning that wont look proper on all resolution sizes.

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >