Search Results

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

Page 158/465 | < Previous Page | 154 155 156 157 158 159 160 161 162 163 164 165  | Next Page >

  • stick button to bottom of element

    - by dzona
    Is there any way to stick child button element to bottom of parent element when number of child elements vary? Parent element is fixed height, and could be scrolled vertically in case of child overflow. In that case, button should be at the end of child list, but in case there is no children, or children size don't push parent element to overflow, it should be at bottom of parent element. Is there pure css solution for this? Thanks

    Read the article

  • How to make a DIV scrollable instead of BODY?

    - by user353901
    hi I want my page's BODY not to be scrollable but a DIV inside the BODY should be scrollable. I have this in my css file: body { overflow:hidden } .mainSection { overflow:scroll } but it doesn't work and the DIV doesn't become scrollabel (it just shows two disabled scroll bars for the DIV)!

    Read the article

  • Position a div relative to a top-level container?

    - by Seifeddine Dridi
    I'm trying to model an HTML document which only contains div elements positioned in absolute. For each div, properties left and top are precalculated wrt. the top-level div, but a problem occurs with nested divs since according to the CSS standard an element is positioned relative to its first ancestral element whose positioning is either relative or absolute. Does anyone know any workaround? EDIT: small code snippet that demonstrates the problem <html> <body style="background-color: #444444"> <div style="position: relative; background-color: white;"> <div style="position: absolute; background-color: red; width: 4cm; height: 3cm; top: 1cm">div 1 <div style="position: absolute; background-color: green; top: 4cm"> div 1.1</div> </div> </div> </body> </html> The green div is expected to be positioned right after the red div, instead there is a gap of 1cm in between.

    Read the article

  • HTML, <table> background

    - by lego69
    hello, I've got one problem... I created table(with one row and one column) for my site and then I put background for table using CSS where I defined image, after that I try to create in the first table another table with 3 rows, Dreamweaver doesn't allow me to do it, it puts new table after first, how can I solve this problem, thanks in advance...

    Read the article

  • Why isn't Chrome displaying my div?

    - by Kyle Sevenoaks
    Click here to see a simple example of what I want. It's really easy, but for some reason Google won't display it. It's part of a foreach loop, if needed I can add other codes. There is nothing else in the rest of the css to mess with this, I have checked about 10 times. Thanks.

    Read the article

  • Div not expanding even with content inside

    - by Aiden Ryan
    I have a stack of divs inside of each other, all of which have an ID which specifies CSS only. But for some reason the surrounding DIV tag only expands to it's anointed height value, and not it's default auto, meaning that although the content is inside, the backing DIV is only a specific height. I need it to adjust the heigh to the size of whatever is inside of it (As there will be user submitted data being echoed out possibly in paragraphs with 500+ words.) Here is my HTML <div id="albumhold"> <div id="albumpic">Pic here</div> <div id="infohold"> <div id="albumhead">Name | Date</div> <div id="albuminfo">Information</div> </div> And the CSS for the HTML code: #albumhold { width: 920px; padding: 10px; height: auto; border: 1px solid #E1E1E1; margin-left: auto; margin-right: auto; background-color: #E1E1E1; background-image: url(../global-images/albumback.png); background-position: top center; background-repeat: repeat-x; } #albumpic { display: block; height: 110px; width: 110px; float: left; border: 1px solid #000; } #infohold { width: 800px; background-color: #CCC; float: right; height: 20px; } #albumhead { width: 800px; height: 20px; text-indent: 10px; border: 1px solid #000; color: #09F; } #albuminfo { margin-top: 5px; width: 800px; float: right; color: #09F; word-wrap:break-word; } Help is greatly appreciated.

    Read the article

  • Highlighting the current page in rails, only works for some pages

    - by raphael_turtle
    I've used this tutorial to highlight the current page in the menu. I have a pages controller with a few static pages, for the home page I simply have def home @title = 'Home and similar for contact pages etc. Then in my main layout file I have <body class="<%= @title %>"> and this works fine to set the correct css, but how do I set @title for my other controllers where there's more than one action?

    Read the article

  • Function to get the font and calculate the width of the string not working on first instance

    - by user3627265
    I'm trying to calculate the width of the string based on the font style and size. The user will provide the string, the font style and the font size, and then after giving all the data the user will hit the submit button and the function will trigger. Basically this script works but only when the submit button is hit twice or the font is selected twice,. I mean if you selec DNBlock as a font, it will not work for first time, but the second time you hit submit, it will then work. I'm not sure where is the problem here, but when I used the default font style like Arial, times new roman etc it works perfectly fine. Any Idea on this? I suspected that the font style is not being rendered by the script or something. Correct me if I'm wrong. Thanks //Repeat String String.prototype.repeat = function( num ) { return new Array( num + 1 ).join( this ); } //Calculate the width of string String.prototype.textWidth = function() { var fntStyle = document.getElementById("fntStyle").value; if(fntStyle == "1") { var fs = "DNBlock"; } else if(fntStyle == "2") { var fs = "DNBlockDotted"; } else if(fntStyle == "3") { var fs = "DNCursiveClassic"; } else if(fntStyle == "4") { var fs = "DNCursiveDotted"; } else if(fntStyle == "5") { var fs = "FoundationCursiveDots-Regul"; } var f = document.getElementById("fntSize").value.concat('px ', fs), o = $('<div>' + this + '</div>') .css({'position': 'absolute', 'float': 'left', 'white-space': 'nowrap', 'visibility': 'hidden', 'font': f}) .appendTo($('body')), w = o.width(); o.remove(); return w; } //Trigger the event $("#handwriting_gen").submit(function () { var rptNO = parseInt($('#rptNO').val()); $("[name='txtLine[]']").each(function(){ alert(this.value.repeat(rptNO).textWidth()); if(this.value.repeat(rptNO).textWidth() > 1000) { $(this).focus(); $(this).css({"background-color":"#f6d9d4"}).siblings('span.errorMsg').text('Text is too long.'); event.preventDefault(); } }); });

    Read the article

  • How do I overlay text on an image who's size is to be set?

    - by Mike
    I am trying to make a bar chart using tables, which I have almost accomplished to my liking. The last step I want is text over my image which represents the bar. Here is the code I have thus far for building my little bar charts: $height = 50; //build length $width = 450; $multi = $brewAvg / 5; $width = $width * $multi; print " <tr > <td > $count. <a href=\"$breweryURL\"> $brewR</a> </td> <td > <img src=\"blueBar.png\" width=\"$width\" height=\"$height\"> </td> </tr> "; And this produces something like this: You can see in the code how I simply calculate the length of the bar based on a breweries rating. What I want to do next is have the rating number show on top of each breweries on the left hand side. How would I go about accomplishing this? Update: I tried a tutorial I read here: http://www.kavoir.com/2009/02/css-text-over-image.html and I changed my code to this: print "<div class=\"overlay\"> "; print " <tr valign=\"middle\" > <td > $count. <a href=\"$breweryURL\"> $brewR</a> </td> <td > <img src=\"blueBar.png\" width=\"$width\" height=\"$height\"> </td> </tr> "; print" <div class=\"text\"> <p> $brewAvg </p> </div> </div> "; And my css I added was this: <style> .overlay { position:relative; float:left; /* optional */ } .overlay .text { position:absolute; top:10px; /* in conjunction with left property, decides the text position */ left:10px; width:300px; /* optional, though better have one */ } </style> And it did put any of the value son top of my images. All the text is in a list above all the bars like this:

    Read the article

  • Show progress without using an image

    - by Jon1
    I would like to design a progress bar, without using an image (eg animated gif...). Can this be done with just html css and jquery? trying to be creative here :) Update: the progress percentage cannot be determined, so it has to be a loop

    Read the article

  • What is the best way to observe the scroll over an element with overflow set?

    - by Phunky
    It's simple to observe the documents scroll event but I can't seem to find anything relating to the scroll of any other element with css property overflow being set? To get around this myself i've been observing mousemove which only fires while you hold down on the scrollbar but this would need to be teamed with a mouse wheel observe also to get the full effect. Could anyone point me in the right direction for a better way of implementing this?

    Read the article

< Previous Page | 154 155 156 157 158 159 160 161 162 163 164 165  | Next Page >