Search Results

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

Page 125/465 | < Previous Page | 121 122 123 124 125 126 127 128 129 130 131 132  | Next Page >

  • jQuery + CSS Manipulation using each()

    - by atif089
    Hi, I am trying to create a css menu. I would like to remove border and padding for every last li > a element on the child ul tag. (sorry for confusing) Here is the code for the menu <ul id="nav"> <li><a id="cat1" href="#">Menu 1</a></li> <li><a id="cat2" href="#">Menu 2</a></li> <li><a id="cat3" href="#">Menu 3</a> <ul> <li><a href="#">Sub Item 1 - M3</a></li> </ul> </li> <li><a id="cat4" href="#">Menu 4</a> <ul> <li><a href="#">Sub Item 2 - M3</a></li> <li><a href="#">Sub Item 3 - M3</a></li> <li><a href="#">Sub Item 4 - M3</a></li> </ul> </li> </ul> The code must remove border and padding for last elements that is <li><a href="#">Sub Item 1 - M3</a></li> <li><a href="#">Sub Item 4 - M3</a></li> Tried this but it takes off border for only sub item 4 $("#nav li ul").each(function(index) { $("#nav li ul > :last a").css('border','0 none'); $("#nav li ul > :last a").css('padding','0'); });

    Read the article

  • Serving static content from cookie less domain and mod_deflate

    - by Saif Bechan
    I have two domain. One domain with my main website and the other with js/css/etc.. files, static content. mod_deflate is enabled for both domains, but when i run ySlow in FireFox it says none of my static content is compressed. When i bring back the js or css file to my normal domain it gets compressed right. Only when its served from the other domain is it not compressed. Do i have to do some more configuration for this to work? I am using this line in my .htaccess file AddOutputFilterByType DEFLATE application/x-javascript text/css text/html text/xml text/plain application/x-httpd-php I tried to but the line in my httpd.conf file but it gives me the same results. PS. If this is more of a serverfault question i am sorry for this. But i see a lot of questions here concerning mod_deflate and ySlow

    Read the article

  • Chrome error with NO_MODIFICATION_ALLOWED_ERR DOM Exception 7

    - by HP
    I have below code to insert a style into DOM (there is a use case for injecting style into DOM so please don't ask why or say to load the css in .css file). <script type="text/javascript"> window.onload = function() { var bmstyle = document.createElement('style'); bmstyle.setAttribute('type', 'text/css'); var styleStr = "#test-div {background:#FFF;border:2px solid #315300;"; bmstyle.innerHTML = styleStr; document.body.appendChild(bmstyle); } </script> If I run in Firefox, it works fine. But I got this error in Google Chrome: Line bmstyle.innerHTML = styleStr; Uncaught Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7 Does anyone have a fix? Thanks

    Read the article

  • change Visibility of a control in ASP.NET code behind (c#)

    - by Axel Grude
    How do you set the visibility of a (fileupload) control from ASP.net code (I need to hide a fileupload control in a webuser control from server site, otherwise hasFIle is always false). Also setting the "Visible" property to false does not work (as is confuses the AJAX panel so the fileupload forgets that it has a file). theFileUpload.Visible = false = does not work so I want to try to set the CSS style visibility to hidden or display to none. The main problem is I want to do it from the server side (I know how I could do it on client). Is there a safe way to overwrite theFileUpload.Attributes["styles"] in case I modify other CSS styles in there, also throwing a whole CSS class at it (by moidifying the CSSClass property) seems like overkill. thanks in advance Axel

    Read the article

  • Move Image or Div Up As Window Resizes?

    - by Wade D Ouellet
    Hi, I have an image in my html with a class of "stretch". Currently, with css, this image re-sizes as the window re-sizes to be 100% of the screen width. I would also like it to move upwards as the window is being re-sized. I'm assuming this can be done with jQuery but I am not quite sure. Basically the "top" css value just needs to change as the screen width does. Here is the css that is currently re-sizing it: .stretch { width: 100%; height: auto; min-height: 420px; position: absolute; top: -200px; } Thanks, Wade

    Read the article

  • ASP.NET: Enumerating header elements from codebehind

    - by JamesBrownIsDead
    On Page_Load() in the codebehind, I'd like to enumerate all the <link> tags. The purpose being I want want to add a <link> to a CSS file if it isn't specified in the Page's markup. How can I do this? I'm thinking I should be able to use LINQ on the collection of elements in the header, no? Here's my pseudocode: var pageAlreadyContainsCssLink = false; foreach(var control in this.Header.Controls) { if (control.TagName == "link" && control.Attributes["href"] == "my_css_file.css") { pageAlreadyContainsCssLink = true; break; } } if (pageAlreadyContainsCssLink) { // Don't add <link> element return; } // Add the <link> to the CSS this.AddCssLink(...);

    Read the article

  • Disappearing IE6 elements.

    - by Stefan Kendall
    I don't know what could be causing this issue, but for some reason, elements on my page (list navigation items, specifically), are disappearing in IE6. That is, from IE developer toolbar, I can see that the elements are there, and the DOM/css is correct, but the elements just aren't visible. The odd thing is that if you set or toggle ANY css element on the list items with the IE6 toolbar, the elements appear. I also have a hover() jQuery action set on the list navigation items, and the event fires as if the elements were visible and working correctly. What could possibly be going wrong here? I initially thought z-index could be an issue, but changing ANY attribute or css value (not necessarily z-index), causes the element to render. I should note, however, that doing this programmatically does not cause the elements to display properly, even if triggered seconds after the page load.

    Read the article

  • What is your Wordpress 2.9 theme development workflow after getting PSD from client?

    - by metal-gear-solid
    What are useful and free resources to make Wordpress 2.9 themes? Is Dreamweaver helpful to make themes ? What are time saving tips? I'm using Dreamweaver CS3 on Windows. and my main browser is FF 3.6. I know some extensions of dreamweaver but those are not updated with wordpress versions. Should we edit theme files directly on live server or Local XAMPP option is better? Should i create XHTML CSS version of PSD then XHTML CSS to wordpress? After making XHTML CSS Version of PSD how to incorporate Wordpress 2.9 Tags in it? Has anyone tried this tool http://www.themedreamer.com/ is this really helpful?

    Read the article

  • Best Image Replacement Technique

    - by Josh Stodola
    What is the best (as in cross-browser) technique to do image replacement in CSS? I am using sprites to do my navigation, but I want the markup to remain SEO friendly. Given the following HTML structure... <div id="menu"> <ul> <li><a href="#">Test</a></li> <li><a href="#">Tester</a></li> <li><a href="#">Testing Testing</a></li> </ul> </div> What is the best way to replace the text with a background image using CSS only? I am currently using this... text-indent: -9999px; But, it fails with CSS on, and images off.

    Read the article

  • Can't print elements in a DIV tag

    - by Mckenzi
    I am using a Drag-able and re-sizeable DIV's in this HTML file. Where the user will place the DIV tag to his desired place in a main parent DIV tag. Now I want to print this main DIV tag, but the problem is that the code which I'm using to PRINT this main DIV is printing in a sequence, like not the way user has arranged the DIV's. Also it doesn't take up the main DIV background IMAGE. here is the code. JAVASCRIPT & CSS <link rel="stylesheet" type="text/css" href="byrei-dyndiv_0.5.css"> <script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.1.min.js" > </script> <script type="text/javascript" src="byrei-dyndiv_1.0rc1.js"></script> <script language="javascript" type="text/javascript"> function change(boxid,divtoaffect) { content = document.getElementById("" + boxid + "").value.replace(/\n/g, '<br>'); document.getElementById(divtoaffect).innerHTML = content; } function select1() { test=document.getElementById("changeMe"); test.style.backgroundImage="url('Sunset.jpg')"; } function select2() { test=document.getElementById("changeMe"); test.style.backgroundImage="url('Blue hills.jpg')"; } function PrintElem(elem) { Popup($(elem).text()); } function Popup(data) { var mywindow = window.open('', 'my div', 'height=400,width=600'); mywindow.document.write('<html><head><title>my div</title>'); /*optional stylesheet*/ //mywindow.document.write('<link rel="stylesheet" href="main.css" type="text/css" />'); mywindow.document.write('</head><body >'); mywindow.document.write(data); mywindow.document.write('</body></html>'); mywindow.document.close(); mywindow.print(); return true; } // Print DIV function printContent(id){ str=document.getElementById(id).innerHTML newwin=window.open('','printwin','left=100,top=100,width=400,height=400') newwin.document.write('<HTML>\n<HEAD>\n') newwin.document.write('<TITLE>Print Page</TITLE>\n') newwin.document.write('<script>\n') newwin.document.write('function chkstate(){\n') newwin.document.write('if(document.readyState=="complete"){\n') newwin.document.write('window.close()\n') newwin.document.write('}\n') newwin.document.write('else{\n') newwin.document.write('setTimeout("chkstate()",2000)\n') newwin.document.write('}\n') newwin.document.write('}\n') newwin.document.write('function print_win(){\n') newwin.document.write('window.print();\n') newwin.document.write('chkstate();\n') newwin.document.write('}\n') newwin.document.write('<\/script>\n') newwin.document.write('</HEAD>\n') newwin.document.write('<BODY onload="print_win()">\n') newwin.document.write(str) newwin.document.write('</BODY>\n') newwin.document.write('</HTML>\n') newwin.document.close() } </script> </head> <body> <style type="text/css"> #output1,#output2 ,#output3 { width: 300px; word-wrap: break-word; border: solid 1px black; } </style> HTML <div style="width:650px;height:300px;" id="changeMe" > <table cellpadding="5" cellspacing="0" width="100%" style="margin:auto;"> <tr> <td><div class="dynDiv_moveDiv" id="output1" style="font-weight:bold;height:20px;margin-top:40px;"> <div class="dynDiv_resizeDiv_tl"></div> <div class="dynDiv_resizeDiv_tr"></div> <div class="dynDiv_resizeDiv_bl"></div> <div class="dynDiv_resizeDiv_br"></div> </div> </td> </tr> <tr> <td><div class="dynDiv_moveDiv" id="output2" style="height:40px;margin-top:30px;"> <div class="dynDiv_resizeDiv_tl"></div> <div class="dynDiv_resizeDiv_tr"></div> <div class="dynDiv_resizeDiv_bl"></div> <div class="dynDiv_resizeDiv_br"></div> </div></td> </tr> <tr> <td><div class="dynDiv_moveDiv" id="output3" style="height:50px;margin-top:40px;"> <div class="dynDiv_resizeDiv_tl"></div> <div class="dynDiv_resizeDiv_tr"></div> <div class="dynDiv_resizeDiv_bl"></div> <div class="dynDiv_resizeDiv_br"></div> </div></td> </tr> </table> </div> <tr> <td align="center"><input type="button" value="Print Div" onClick="printContent('changeMe')" /> </td> </tr>

    Read the article

  • Drupal: Multiple Stylesheets

    - by Vecta
    I'm currently creating a custom Drupal theme for my company and I'm having trouble getting multiple stylesheets to load. I followed the instructions on this page by adding stylesheets to the .info file in the format: stylesheets[all][] = style.css stylesheets[all][] = name2.css etc... However, when I load the page nothing changes and when I view source, it consistently lists style.css but seems to ignore the others. Am I misunderstood in the process of adding additional stylesheets? What could I be doing incorrectly? Thanks for any help!

    Read the article

  • Twitter Bootstrap Collapsible Navbar Duplicating

    - by sixeightzero
    I am working on a project using Twitter Bootstrap. One thing that I noticed is that my pages have duplicate navbars when they are defined as collapsible and the page is resized smaller. Here is the duplicate NavBar: Here is the normal width NavBar: Code: <!DOCTYPE html> <html lang="en"> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title></title> <meta name="description" content=""> <meta name="viewport" content="width=device-width"> <link rel="stylesheet" href="/assets/css/bootstrap.css"> <style> body { padding-top: 60px; } </style> <link rel="stylesheet" href="/assets/css/bootstrap-responsive.min.css"> <link rel="stylesheet" href="/assets/css/main.css"> <script>window.jQuery || document.write('<script src="/assets/js/vendor/jquery-1.8.1.min.js"><\/script>')</script> <script src="/assets/js/vendor/modernizr-2.6.1-respond-1.1.0.min.js"></script> </head> <body class="dark"> <!--[if lt IE 9]> <p class="chromeframe">You are using an outdated browser. <a href="http://browsehappy.com/">Upgrade your browser today</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to better experience this site.</p> <![endif]--> <div class="navbar navbar-inverse navbar-fixed-top"> <div class="navbar-inner"> <div class="container"> <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a> <a class="brand" href="#">Project name</a> <div class="nav-collapse collapse"> <ul class="nav"> <li class="active"><a href="#">Home</a></li> <li><a href="#about">About</a></li> <li><a href="#contact">Contact</a></li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="#">Action</a></li> <li><a href="#">Another action</a></li> <li><a href="#">Something else here</a></li> <li class="divider"></li> <li class="nav-header">Nav header</li> <li><a href="#">Separated link</a></li> <li><a href="#">One more separated link</a></li> </ul> </li> </ul> </div><!--/.nav-collapse --> </div> </div> </div> Has anyone else run into this and have some pointers?

    Read the article

  • Define variable in variable/parameter and use in javascript?

    - by Ross
    I want to defined a variable/parameter in CSS and access it by javascript. What is the best way of doing this? One option I thought of would be to place a cutsom attribute on the body element, then access that attribute via jQuery. A little more info: I'm defining colour sets in CSS. I've created a function with RaphaelJS to draw a gradient background on the page. I want this function to use a highlight colour (which is not used elsewhere on the DOM) which will be defined in the CSS along with the other colour elements. Thanks

    Read the article

  • display:table killing me in IE

    - by subpixel
    I want to create horizontally-aligned table cells like the ones on this page. I've followed the instructions, and I've even copied the css and markup verbatim, but no matter what I do IE 8 renders my table cells as blocks (stacked on top of each other instead of aligned next to each other). css: <style type="text/css"> body.TableStyles { display: inline-table; border-spacing: 4px; } div.maketable p { display: table-cell; width: 20%; background-color: #cdf; padding: 4px; } </style> markup: <body class="TableStyles"> <div class="maketable"> <p>< prev</p> <p>next ></p> </div> </body>

    Read the article

  • What is preferred accessible and semantically correct method to code this type of data design?

    - by jitendra
    What is preferred accessible and semantically correct method to code this type of data design? Table UL, LI DIV,SPAN For icons should i use for each place or i should is icon from CSS sprites? If we use css sprite here then how to code, and what will happen when images will be disabled ? Every link will open in new window and I have to indicate about file size also for both sighted and blind users? So what is the best method to make this design and what is best method to show icon and to indicate all type of users that file will open in new window and what is file size? Content of table should be accessible and understandable in as good as possible manner in all conditions For sighted user even if images are disabled for screen user for text browser user and if css is disabled And What is the role of Filenames of PDF, video, audio here?

    Read the article

  • Switching/Linking to another external stylesheet in a .js file using Ruby on Rails

    - by Jake
    Im learning JQuery from a Sitepoint Book but Im trying to apply all the lessons to a Rails App. In one lesson, we are taught how to switch to a different stylesheet if the browser window is resized beyond a certain point. Here's the javascript code: if ($('body').width() > 900) { $('<link rel="stylesheet" href="wide.css" type="text/css" />') .appendTo('head'); } else { $('link[href=wide.css]').remove(); } Rails doesn't seem to want to link to the new stylesheet using 'link rel'. I've tried using the Rails helper: <%= stylesheet_link_tag 'base', :media => 'screen' %> but that doesn't work in a .js file. How do I link to an external stylesheet in a .js file using Ruby? Can I use Ruby on Rails code in a .js file? Thanks.

    Read the article

  • Does margin-left:2px; render faster than margin:0 0 0 2px;?

    - by Christopher Altman
    Douglas Crockford describes the consequence of Javascript inquiring a node's style. How simply asking for the margin of a div causes the browser to 'reflow' the div in the browser's rendering engine four times. So that made me wonder, during the initial rendering of a page (or in Crockford's jargon a "web scroll") is it faster to write CSS that defines only the non-zero/non-default values? To provide an example: div{ margin-left:2px; } Than div{ margin:0 0 0 2px; } I know consequence of this 'savings' is insignificant, but I think it is still important to understand how the technologies are implemented. Also, this is not a question about formatting CSS--this is a question about the implementations of browsers rendering CSS. Reference: http://developer.yahoo.com/yui/theater/video.php?v=crockonjs-4

    Read the article

  • Non-IE6 IE7 hack

    - by thermal7
    I managed to create a page the crashes IE6 and 7 regularly as per here: http://raven-seo-tools.com/blog/2675/crash-ie6-with-only-css I have a solution for non-IE browsers (display: inline-block), but the only way to get IE6/7 working is to use different CSS (display: inline). Normally I would have other browsers use inline-block, then in a seperate IE67 CSS file I would set display to inline. The problem is IE67 crash as soon as they reach the display: inline-block line, so I need a way to hide this code from IE6 and 7 but not other browsers.

    Read the article

  • IE8 no honoring display:none

    - by user357034
    I have the following markup on a page and unfortunately I do not have direct access to it. . This page is opened in an iframe. There is other code on the page but it is not relevant so I have not posted it. The only access to target the code in via css. I want to not display the close button so I added this to the css file img[alt='Close'] {display:none !important;} this is the markup <td align="center"><a href='javascript:window.close()'><img src='v/vspfiles/templates/100/images/buttons/btn_close.gif' alt='Close' border=0></a></td> It works as expected in all browsers that i have tested (firefox, Opera, Safari) but in IE8 it seems to ignore this css and shows the button. Not sure if it doesn't like the selector or perhaps I have a syntax error. Not sure where to go from here.

    Read the article

  • jQuery default/placeholder input text and problems with saved information

    - by user318106
    Hey Guys, I'm new to jQuery and have an annoying problem. I have some login fields that are filled with default text when the field is empty and then removed when clicked. My problem is that when the user has their username/password saved (with browser), if they return to the page the login fields are filled with the users saved input as well as the default input. $('#login input.text').each(function(i, field) { field = $(field); if (field.val().length 0) { field.prev().css('display', 'none'); } field.focus(function() { field.prev().css('display', 'none'); }).blur(function() { if (field.val() == '') field.prev().css('display', 'block'); }); })

    Read the article

  • Need help using ThemeRoller

    - by Music Magi
    Hi - I'm using DataTables to dress up a table I'm using to display XML results based on an XSL transformation. I have everything working from a technical sense (paging, sorting, filtering), but I'm trying to figure out to use a ThemeRoller theme to make it look like they have on their website. So far, I have added the following file to my project with its reference: <link type="text/css" href="css/custom-theme/jquery-ui-1.8.7.custom.css" rel="stylesheet"/> and enabled ThemeRoller themes using the following as per the DataTables website: $(document).ready(function() { $('#mainTable').dataTable( { "bJQueryUI": true, "sPaginationType": "two_button" }); }); The table gets styled, but it doesn't look right with the header rows being too wide and things being on multiple lines that should be on one line. Any indication as to what I'm doing wrong? Thanks very much in advance.

    Read the article

  • Best way to style GWT widgets in a library

    - by helios
    I'm developing some widgets into a library for internal use at the company I work for. I don't know what's the recommended way to style the widgets. There are at least these ways: use Widget.setPrimaryStyleName and let the user provide an external css. We use maven archetypes to build applications so we can provide default styles. Anyway I don't like it very much. use the GWT 2.0 CssResourceBundle. So we can compile the CSS into the module and it will be optimized (and it can be browser-dependant too). provide a module with the styling. Something like the default GWT themes. But I don't know how exactly this works. I want to: make the components as cohesive as I can (don't depend on externally included css's) leave open the door to modify styles (if I want to change the way some widget looks in a concrete application). What's your experience in this subject?

    Read the article

  • Fastest tr:hover method

    - by Alex
    What is the single fastest method for table row hover css change? I've tried jQuery (onmouseover/out) and CSS with tr:hover, but once I make my page fullscreen (1920x1200) the performance on my grid is getting just sluggish enough to give the entire page a feel of being sub-par. That's on a grid with 25 rows, and some spans and divs per row. I've tried IE and Google Chrome. Is there another, faster method? What is generally considered the fastest method across browsers for doing hover CSS changes?

    Read the article

  • jQuery leaveNotice plugin and internet explorer

    - by Mikhail Nikalyukin
    Hello, im using leaveNotice plugin and example from authors page (example number six, the last one) On the site all looks all right in both chrome and ie8. When im implement this in my page, in chrome all still looks ok, but ie as usually messed it up. Background appears under the text and pop up appears under the background. It's propably issue with css, but im not have css skills to fix it up. Plus with same css on example site all looks all right, im a lil bit confuse, help me please.

    Read the article

  • Background Image displaying in Design view but not in browser? (Visual Studio 2008)

    - by Tom Hutchinson
    I'm new to CSS and this issue in Visual Studio is driving me mad! I have a background image defined within a simple style sheet... body { background-image: url(Images\Greenhouse.jpg); background-position: center; } My style sheet is referenced within the HTML code... <head runat="server"> <title></title> <link rel="Stylesheet" type="text/css" href="Stylesheet.css"/> </head> The background image shows in design view but in the browser, nothing! I've tried changing position etc and refreshed the browser, cleared the cache etc. This happens with all my images. Images are within the project folder (\Images) and added to the solution explorer in VS. Tried "", changing image file names etc, nothing is working!

    Read the article

< Previous Page | 121 122 123 124 125 126 127 128 129 130 131 132  | Next Page >