Search Results

Search found 11505 results on 461 pages for 'css transitions'.

Page 26/461 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • Webkit browser jQuery transformations/transitions not working with jSplitSlider

    - by user3689793
    I am helping to build a site and i'm having an issue with the functionality of an add-in called jsplitslider when running it in chrome. Right now, when I navigate between the slides, the div's get stuck on top of each other and never clear the webkit transformations/animations: <div class="sl-content-slice" style="transition: all 800ms ease-in-out; -webkit-transition: all 800ms ease-in-out;"> I think the problem is due to timing of the functions, but I can't seem to figure out where I would need to add a setTimeout(). I only think this because I exhausted a lot of the other options like display: inline-block, notransitions css, etc. I'm desperate to figure out how to make this work in chrome. It works in FF and IE(surprisingly enough). I'm not great at webcoding, so any help will be appreciated! The code on the site isn't minimized. Here is the jQuery where I think the problem lies: var cssStyle = config.orientation === 'horizontal' ? { marginTop : -this.size.height / 2 } : { marginLeft : -this.size.width / 2 }, // default slide's slices style resetStyle = { 'transform' : 'translate(0%,0%) rotate(0deg) scale(1)', opacity : 1 }, // slice1 style slice1Style = config.orientation === 'horizontal' ? { 'transform' : 'translateY(-' + this.options.translateFactor + '%) rotate(' + config.slice1angle + 'deg) scale(' + config.slice1scale + ')' } : { 'transform' : 'translateX(-' + this.options.translateFactor + '%) rotate(' + config.slice1angle + 'deg) scale(' + config.slice1scale + ')' }, // slice2 style slice2Style = config.orientation === 'horizontal' ? { 'transform' : 'translateY(' + this.options.translateFactor + '%) rotate(' + config.slice2angle + 'deg) scale(' + config.slice2scale + ')' } : { 'transform' : 'translateX(' + this.options.translateFactor + '%) rotate(' + config.slice2angle + 'deg) scale(' + config.slice2scale + ')' }; if( this.options.optOpacity ) { slice1Style.opacity = 0; slice2Style.opacity = 0; } // we are adding the classes sl-trans-elems and sl-trans-back-elems to the slide that is either coming "next" // or going "prev" according to the direction. // the idea is to make it more interesting by giving some animations to the respective slide's elements //( dir === 'next' ) ? $nextSlide.addClass( 'sl-trans-elems' ) : $currentSlide.addClass( 'sl-trans-back-elems' ); $currentSlide.removeClass( 'sl-trans-elems' ); var transitionProp = { 'transition' : 'all ' + this.options.speed + 'ms ease-in-out' }; // add the 2 slices and animate them $movingSlide.css( 'z-index', this.slidesCount ) .find( 'div.sl-content-wrapper' ) .wrap( $( '<div class="sl-content-slice" />' ).css( transitionProp ) ) .parent() .cond( dir === 'prev', function() { var slice = this; this.css( slice1Style ); setTimeout( function() { slice.css( resetStyle ); }, 150 ); }, function() { var slice = this; setTimeout( function() { slice.css( slice1Style ); }, 150 ); } ) .clone() .appendTo( $movingSlide ) .cond( dir === 'prev', function() { var slice = this; this.css( slice2Style ); setTimeout( function() { $currentSlide.addClass( 'sl-trans-back-elems' ); if( self.support ) { slice.css( resetStyle ).on( self.transEndEventName, function() { self._onEndNavigate( slice, $currentSlide, dir ); } ); } else { self._onEndNavigate( slice, $currentSlide, dir ); } }, 150 ); }, function() { var slice = this; setTimeout( function() { $nextSlide.addClass( 'sl-trans-elems' ); if( self.support ) { slice.css( slice2Style ).on( self.transEndEventName, function() { self._onEndNavigate( slice, $currentSlide, dir ); } ); } else { self._onEndNavigate( slice, $currentSlide, dir ); } }, 150 ); } ) .find( 'div.sl-content-wrapper' ) .css( cssStyle ); $nextSlide.show(); }, _validateValues : function( config ) { // OK, so we are restricting the angles and scale values here. // This is to avoid the slices wrong sides to be shown. // you can adjust these values as you wish but make sure you also ajust the // paddings of the slides and also the options.translateFactor value and scale data attrs if( config.slice1angle > this.options.maxAngle || config.slice1angle < -this.options.maxAngle ) { config.slice1angle = this.options.maxAngle; } if( config.slice2angle > this.options.maxAngle || config.slice2angle < -this.options.maxAngle ) { config.slice2angle = this.options.maxAngle; } if( config.slice1scale > this.options.maxScale || config.slice1scale <= 0 ) { config.slice1scale = this.options.maxScale; } if( config.slice2scale > this.options.maxScale || config.slice2scale <= 0 ) { config.slice2scale = this.options.maxScale; } if( config.orientation !== 'vertical' && config.orientation !== 'horizontal' ) { config.orientation = 'horizontal' } }, _onEndNavigate : function( $slice, $oldSlide, dir ) { // reset previous slide's style after next slide is shown var $slide = $slice.parent(), removeClasses = 'sl-trans-elems sl-trans-back-elems'; // remove second slide's slice $slice.remove(); // unwrap.. $slide.css( 'z-index', 10 ) .find( 'div.sl-content-wrapper' ) .unwrap(); // hide previous current slide $oldSlide.hide().removeClass( removeClasses ); $slide.removeClass( removeClasses ); // now we can navigate again.. this.isAnimating = false; this.options.onAfterChange( $slide, this.current ); }, Sorry if I missed any conventions when posting, this is my first S.O. post. Thanks in advance for any help.

    Read the article

  • From concept to reality. Teach me how to CSS style my divs [closed]

    - by unixman83
    I have the html layout of my simple web page below (commented). What css do I add to <div> classes to get the rendering that I want? I want to learn. Give me the CSS file for it please. <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>My Website</title> </head> <body> <div class="outer"> <!--Outer content box 750px wide--> <div class="header"> The heading of the page. </div> <div class="main"> <div class="leftbar"> A sidebar on the left with categories. </div> <div class="content"> The main content of the page. </div> </div> </div> </body> </html>

    Read the article

  • drupal themes: .info file: how do I add more than 1 css file / js file to my theme?

    - by egarcia
    I'm creating a new Drupal theme. Until now, I only needed to include a single css file and a single js file. So my theme.info file had something like this: stylesheets[all][] = css/style.css scripts[] = js/script.js Now I must include jquery and jquery-ui in order to use a calendar date. These come with 2 new javascript files, and 1 additonal css file that I must add to the site. The calendar input form is going to be used in all pages (on a side block) so it is ok for me to load the extra css/javascript on all pages. I think the easiest thing would be to reference them on the .info file itself. At first I tried to just put them there with separate spaces: stylesheets[all][] = css/style.css css/ui-lightness/jquery-ui-1.8.1.custom.css scripts[] = js/jquery-1.4.2.min.js js/jquery-ui-1.8.1.custom.min.js js/reservations.js I emptied drupal's cache and... none of them loaded. I then tried separating each file with a comma, and flushing the cache again. Same result. I've browsed some drupal pages, but could not find how to add several javascript/css files on one theme (they always seem to add just 1 of each). So, how do I include several css/javascript files on the .info file?

    Read the article

  • drupal themes: how do I include several css files / js files on my theme's .info file?

    - by egarcia
    I'm creating a new Drupal theme. Until now, I only needed to include a single css file and a single js file. So my theme.info file had something like this: stylesheets[all][] = css/style.css scripts[] = js/script.js Now I must include jquery and jquery-ui in order to use a calendar date. These come with 2 new javascript files, and 1 additonal css file that I must add to the site. The calendar input form is going to be used in all pages (on a side block) so it is ok for me to load the extra css/javascript on all pages. I think the easiest thing would be to reference them on the .info file itself. At first I tried to just put them there with separate spaces: stylesheets[all][] = css/style.css css/ui-lightness/jquery-ui-1.8.1.custom.css scripts[] = js/script.js js/jquery-1.4.2.min.js js/jquery-ui-1.8.1.custom.min.js I emptied drupal's cache and... none of them loaded. I then tried separating each file with a comma, and flushing the cache again. Same result. I've browsed some drupal pages, but could not find how to add several javascript/css files on one theme (they always seem to add just 1 of each). So, how do I include several css/javascript files on the .info file?

    Read the article

  • MVC 2 View Layout CSS Control Layout

    - by Cory Mathewson
    I'm new to a lot of what I'm trying to do with the development of a new MVC2 web application so this is a beginner question. I need to understand my options for control and content layout on a web page. I’m using MVC2 so I’m using Controllers, Views, ViewModels, and View Templates. What I need to spin up on…fast…is control the granular layout of controls and content on any particular view. Below I’ve pasted two examples of auto generated templates that illustrate my challenge. I see that layout is controlled by CSS in my Site.css document. In the first example I get a sequential flow of DisplayLabel and DisplayField. I prefer the adjacent layout of DisplayLabel on the same line as DisplayField produced from example 2. However, example 2 is too simple because the formatting is applied to the Label and the Field. I think the correct way to tackle this learning curve is Microsoft Expression but I don’t have personal bandwidth at the moment to tackle Expression. Can anyone point me to a resource that will expose me to lots of examples for CSS formatting? I have lots of syntax questions. For instance, I believe is referencing the Site.css but I can’t find a "display-label" section in Site.css. Example 1 <fieldset> <legend>Fields</legend> <div class="display-label">DocTitle</div> <div class="display-field"><%: Model.DocTitle %></div> <div class="display-label">DocoumentPropertiesID</div> <div class="display-field"><%: Model.DocumentPropertiesID %></div> Example 2 <h2>Title: <%: Model.DocTitle %></h2> <h2>Created: <%: Model.Created %></h2> <h2>Modified: <%: Model.Modified %></h2> <h2>Author: <%: Model.tbl_Author.Name %></h2> <h2>Genre: <%: Model.tbl_DocumentGenre.GenreName %></h2>

    Read the article

  • IE8 web slice - CSS problem

    - by rjovic
    Again me with IE8 web slice :) This time i have following problem. I created web slice for IE8 and created button for users where they can choice to add it to their browsers. Code is : <input class="add" type="button" value="Dodaj Xica web slice u IE8!" onclick='window.external.AddToFavoritesBar("http://localhost:51914/Home/GetWebSlice", "xica.rjovic.com", "slice");' /> There is everything fine, and web slice is added to IE8 and web page is displayed correct. But I have problem with CSS in web slice. I defined css in it, but when web slice i rendered there are only black fonts without any css properties. My web slice is defined as : <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>GetWebSlice</title> <style type="text/css"> p {color: white; } body {background-color: blue; } .container {background-color: red;} </style> </head> <body> <div class="hslice container" id="xica"> <h2 class="entry-title container">Xica web slice</h2> <div class="entry-content"> <h2>Saldo : <b><%= ViewData["total"] %></b></h2> <p><%= ViewData["cardNumber"] %></p> <p>Status : <%= ViewData["status"] %></p> </div> </div> </body> </html> When I try to see web slice directly in my browser then everything is ok, and css is show as expected. Thank you...! EDIT : here is the picture of problem : http://www.deviantpics.com/share-2F10_4BD73E25.html

    Read the article

  • ASP.NET MVC loading of CSS based off of controller

    - by Scott
    Within my site I have controller specific CSS files in addition to my master css file. For example CSS/ Prodcuts/ product.css ... Blog/ blog.css ... masterStyle.css Where masterStyle.css is the master css file. What I want to do is when the user hits http://www.example.com/Products/ only mySite.css and all css files under Products get included. What is the best way to go about doing this?

    Read the article

  • PyQt WebKit CSS background image not showing

    - by Enfors
    I'm making a Twitter client with PyQt, which uses WebKit to draw the tweet list. Now I'm trying to use CSS to set a background image in the WebKit widget - but the image won't show up. This is the relevant part of the CSS: body { background-image: url("gradient2.jpg"); } The file name is correctly spelled, and it is located in the same directory as the Python program, which is also where I start the program from (so the image file should be in PWD). To check if WebKit somehow looks for the image in the wrong directory anyway, I ran my program through strace, which creates a log of all system calls made by the program. And surprisingly, the name of the image does not appear in the log - so it seems as if WebKit doesn't even try to find it. To verify that my CSS is used at all by WebKit, I tried changing it to a solid background color instead of an image: body { background: #CCFFCC; } And that works. So I know that the CSS is used, that's not the problem. Could it be that WebKit refuses to use "ordinary" files in the filesystem, and that I somehow have to create some sort of "resource" file containing my image in Qt Designer?

    Read the article

  • Best practice for defining CSS rules via JavaScript

    - by Tim Whitlock
    I'm loading a stylesheet that is only required when javascript is enabled. More to the point, it mustn't be present if JavaScript is disabled. I'm doing this as soon as possible (in the head) before any javascript libraries are loaded. (I'm loading all scripts as late as possible). The code for loading this stylesheet externally is simple, and looks like this: var el = document.createElement('link'); el.setAttribute('href','/css/noscript.css'); el.setAttribute('rel','stylesheet'); el.setAttribute('type','text/css'); document.documentElement.firstChild.appendChild(el); It's working fine, but all my CSS file contains at the moment is this: .noscript { display: none; } This doesn't really warrant loading a file, so I'm thinking of just defining the rule dynamically in JavaScript. What's best practice for this?. A quick scan of various techniques shows that it requires a fair bit of cross-browser hacking. P.S. pleeease don't post jQuery examples. This must be done with no libraries.

    Read the article

  • Opacity CSS not working in IE8

    - by Alistair Christie
    I'm using CSS to indicate the trigger text for a jQuery slide-down section: i.e. when you hover over the trigger text the cursor changes to a pointer and the opacity of the trigger text is reduced to indicate that the text has a click action. This works fine in Firefox and Chrome, but in IE8 the opacity doesn't change. I've tried a variety of CSS settings without any success. For example HTML: <h3 class="slidedownTrigger">This is the trigger text</h3> CSS: .slidedownTrigger {     cursor: pointer;     -ms-filter: “progid:DXImageTransform.Microsoft.Alpha(Opacity=75)”;     filter: alpha(opacity=75);     -khtml-opacity: 0.75;     -moz-opacity: 0.75;     opacity: 0.75; } What's stopping IE changing the opacity? Note: I've tried this on a variety of different elements, swapping round the order of the CSS statements, and just using the IE ones on their own. I've also tried using -ms-filter: "alpha(opacity=75)"; but with no success. I've run out of things to try to get opacity modification working in IE8. Any ideas?

    Read the article

  • css hover vs. javascript mouseover

    - by John
    There are times when I have a choice between using a css element:hover or javascript onmouseover to control the appearance of html elements on a page. Consider the following scenario where a DIV wraps an INPUT <div> <input id="input"> </div> I want the input to change background color when the mouse cursor hovers over the div. The CSS approach is <style> input {background-color:White;} div:hover input {background-color:Blue;} </style> <div><input></div> The javascript approach is <div onmouseover="document.getElementById('input').style.backgroundColor='Blue';"> <input id="input"> </div> What are the advantages and disadvantages of each approach? Does the CSS approach work well with most web browsers? Is javascript slower than css?

    Read the article

  • Changing CSS height property removes anchors?

    - by JMan
    I am working on a standard header/navigation for my website. I started with having a CSS "height" value of 100% for the html, body elements but this resulted in the wrong layout. However, when I change the CSS height property from "100%" to "auto", the layout is correct, but I lose the anchors in the navigation. Why is this? Here's my CSS: html,body { height: auto; /* This is the only property that I'm toggling */ margin: 0; } body { margin: 0; min-width: 978px; font: 12px/16px Arial, Helvetica, sans-serif; color: #000; background: #000001 url('../images/bg-body.jpg') no-repeat 50% 0; } #nav { position: relative; float: left; margin: 0; padding: 0 2px 0 271px; list-style: none; background: url('../images/sep-nav.gif') no-repeat 100% 0; } #nav li { float: left; padding: 11px 0 0 2px; height: 35px; width: 128px; line-height: 22px; font-size: 18px; text-align: center; background: url('../images/sep-nav.gif') no-repeat 0 -1px; display: inline; } #nav li a {color: #FFFEFE;} ..... I compared the computed CSS in Firebug when the html, body height property was set to "auto" vs. "100%" and they were the same. Can somebody please shed some light on how retain the anchors in the navigation while setting height to "auto"? Thanks for your help.

    Read the article

  • Changing CSS Rules using JavaScript or jQuery

    - by Praveen Kumar
    Initial Research I am aware of using .css() to get and set the CSS rules of a particular element. I have seen a website with this CSS: body, table td, select { font-family: Arial Unicode MS, Arial, sans-serif; font-size: small; } I never liked Arial Unicode as a font. Well, that was my personal feel. So, I would use Chrome's Style Inspector to edit the Arial Unicode MS to Segoe UI or something which I like. Is there anyway, other than using the following to achieve the same? Case I $("body, table td, select").css("font-family", "Segoe UI"); Recursive, performance intensive. Doesn't work when things are loaded on the fly. Case II $('<style>body, table td, select {font-famnily: "Segoe UI";}</style>') .appendTo("head"); Any other better method than this? Creates a lot of <style> tags!

    Read the article

  • CSS styles are not applied to elements added to JavaFX component tree

    - by pazabo
    I have applied CSS style to JavaFX components and it looks like everything is working fine except one situation: when I add JavaFX components to component tree on-the-fly their CSS styles are not applied. For example following code: package test; import javafx.stage.Stage; import javafx.scene.Scene; import javafx.scene.shape.Rectangle; import javafx.scene.input.MouseEvent; import javafx.util.Math; import javafx.scene.paint.Color; function getRect(): Rectangle { return Rectangle { x: 230 * Math.random() y: 60 * Math.random() width: 20, height: 20 styleClass: "abc" } } def stage: Stage = Stage { scene: Scene { width: 250, height: 80 stylesheets: "{__DIR__}main.css" content: [ Rectangle { x: 0, y: 0, width: 250, height: 80 fill: Color.WHITE onMouseClicked: function (evt: MouseEvent): Void { insert getRect() into stage.scene.content; } } getRect() ] } } with following stylesheet: .abc { fill: red; } in main.css file (both in test package) display red square on white background, but after clicking the main rectangle black (not red) squares are added to scene. I noticed that: Components added dynamically look just like style information was not applied. If you set their style in JavaFX code then everything works fine. After changing stylesheets property (so that it points to another valid stylesheet) the objects already added render properly. Does anyone know the solution to this problem? I could of course put all the properties into JavaFX code or provide another stylesheet (for every existing stylesheed) that would contain the same data and change stylesheet right after adding any component, but I would like to find some elegant solution. Thanks in advance.

    Read the article

  • Should I choose <button> element or css buttons?

    - by Kenny Bones
    Ok, here's the thing. I've done a webpage which contains forms and so I added buttons as elements and this works great. I created their own css classes and use graphics as background images for each of them. All working great (these are submit buttons btw) Anyway, I've also got a jQuery script from before that takes all a href hyperlinks and add content from a set div from an external file and adds to a div in my current page, all in one animation. But this would probably not work with form buttons? In any case I need to be able to have these buttons work as traditional hyperlinks anyway. So what do I do? I thought about using css-buttons alltogether, but I'm not able to have them stack vertically. Using float left or right just put the buttons outside of their parent containers (probably a different fix for that). But in any case, using css buttons, that wouldn't work as a submit button for the forms anyway would it? Should I perhaps use both form buttons and css buttons? What do you do?

    Read the article

  • Style row banding and selection in tr:table using CSS

    - by Alex Larzelere
    I've got a tr:table that I need to style using CSS. All the normal style functions of a table are working, but row banding and row selection aren't coming up. When I view the rendered source, I'm not seeing a difference in the rows for an id or class to grab on to, and the official documentation doesn't have any attributes for declaring a style class for either. Is this possible and if so what do I need to do to get my CSS to grab onto it? <tr:table id="myTable" value="#{tableValues}" rowBandingInterval="1"> <tr:column> ##Stuff## </tr:column> <tr:column> ##Stuff## </tr:column> <tr:column> ##Stuff## </tr:column> </tr:table> Edit Let me try to clairfy what's happening. First, using the declaration above tells jsf to generate a table, and the attribute rowBandingInterval tells it to give each row alternating colors (If it was set to 2, then it would do 2 rows one color, 2 rows another, 2 rows the original, etc.) Once the page gets rendered into standard html, trinidad (and jsf) apply their own classes and IDs to the html. My normal procedure is to look at the rendered html, find the class that it is appling and add CSS rules for it. However in this case, no additional styles are added (nothing in the rendered html denotes one row to be different from another). So the question is, how do I tell trinidad to either give alternating rows and the user selected row different classes/IDs for me to grab on to with CSS?

    Read the article

  • Concatenate 2 text elements on a line with full-width border using CSS only

    - by Michael Horne
    Okay, I'm a newbie to CSS3, so please be gentle. ;-) I'm working with some Wordpress code (Woocommerce plugin, to be exact), and I'm trying to format a line of code in a sidebar so that 2 separate text items (one in an <a, the other in a <span are all on the same line, the full width of the column, and with a bottom border. It looks something like this (except the bottom border on each text do not go all the way across the enclosing sidebar box): http://www.dalluva.com/temp/browse-catalog.JPG (sorry, I'm new and can't post inline images yet) Here's the code fragment I'm trying to live with (i.e. I don't want to change it): <div class="widget"> ... <ul class="product-categories"> <li class="cat-item"> <a href="http://localhost/dalluva/shop/product-category/books/">Books</a> <span class="count">(5)</span> </li> ... And here's the CSS I have now: .widget ul li a { border-bottom: 1px solid #e9e9e9; line-height:1.0; padding: 5px 0 5px 22px; display: inline-block; } .widget ul li span { border-bottom: 1px solid #e9e9e9; line-height: 1.0; padding: 5px 0 5px 0; display: inline-block; } The output in the image above looks right for this CSS code, but when I change the 'span' CSS to include a width:100%, it causes the span element to wrap to the next line, looking like this: http://www.dalluva.com/temp/browse-catalog-2.JPG I've played with white-space:nowrap, overflow:hidden, etc, but I can't seem to find a way to have both the <a and the <span text on the same line with the border extending the full width of the column. Any suggestions on getting the desired effect through CSS only? Thanks. Michael

    Read the article

  • jquery CSS doesn't work in webkit

    - by Mauro74
    I'm trying to apply some css to an image tag if the image is portrait, but for some reason .css() doesn't work in webkit. Basically the image tag doesn't get the 'style' property. Here's my code: $(document).ready(function () { $('.listing .item .thumb img').each(function () { var _img = $(this); var _imgWidth = _img.outerWidth(); var _imgHeight = _img.outerHeight(); if (_imgHeight > _imgWidth) { _img.css('top', '-40%'); } }); }); <div class="listing about"> <div class="item"> <a href="#" class="thumb"> <img src="../_uploads/siteassets/images/thumb-carousel-2.jpg" /> <span class="frame"></span> </a> <span class="snippet"> <a href="#" class="title">Name Surname</a> <span class="date">Role in the company</span> <p class="description">Lorem ipsum dolor sit amet...</p> </span> </div> </div> I've tried to use .attr() instead of .css() but nothing. It doesn't work! Any idea why?

    Read the article

  • How do I toggle CSS with jQuery?

    - by marcamillion
    I have the following code: $('#bc' + $.trim($this) + ' span.dashed-circle').css({ 'border' : '5px solid #000'}); That is triggered by a click.function(). I would like that to be a toggle - so when I click the element, it changes the border to what I have above...but when it is clicked again it disappears or rather sets the border to ' '. Thoughts? Edit: I should have been explicit...but I don't want to create a CSS class. The reason being is because when I do that, it messes up the formatting of the element being styled. I am sure that it is some small quirk somewhere that would fix it, but I am not interested in wading through the entire code base to fix little positioning issues with a new class. I would much rather just edit the css attribute directly - because it doesn't interfere with the layout. Edit2: Here is the jsfiddle of the code I am trying to edit. If you notice, I have the CSS attributes last. But how do I let that be toggled ? Edit3: If anyone is interested...the UI that this will be used in is for my webapp - http://www.compversions.com

    Read the article

  • CSS to specify positions over a scanned document

    - by itsols
    I'm trying to write the CSS rules to position text over a scanned document. Reason: The document is a pre-printed form. I am trying to position the text on-screen so that it relates to the 'spaces' on the actual form. Issue: Although I position the values using centimeters, they don't seem to get aligned with the ones on the actual page. I can see this misalignment since my scanned image is in the background of the page. What I've tried: I used a ruler to physically measure the locations and specify them with CSS. But on-screen, it doesn't tally. I used the scanned image to position the CSS values. Then the printout is not correct. I even scaled the scanned page using Inkscape to the exact dimensions in centimeters and took into account all margins, etc... What I need: I am trying to correctly show the output values on-screen AND have them print in the correct manner as well. I know that using two CSS sheets (one for print) is an option. But I'm developing this program away from where the actual printing is to be done. So is there a convenient way of matching the exact screen locations with those on the actual/final prinout? Thanks!

    Read the article

  • Help- CSS styles for text links also affecting image links

    - by blabus
    I've been working on this one for about an hour now, and I'm about ready to pull my hair out. What seems like it should be a simple one or two lines of CSS apparently isn't. I have a Posterous blog with a custom theme I designed for a client, viewable here: http://phar-ma.com/ I obviously use CSS to style the text links in the posts. My problem is, the same styles are also being applied to images that have a larger version to view, since Posterous automatically turns them into links to the larger versions (the smaller images aren't turned into links). So basically I need to figure out how the return the styling of the link images to the same as the non-link images. Right now they have weird spacing and borders around them (because of the styles for the text links) and those change when you hover over them. They're also not centered correctly. I've tried just about every piece of CSS code I know, and I've had absolutely no luck. I also searched on Google and found this: http://perishablepress.com/press/2008/10/14/css-remove-link-underlines-borders-linked-images/ but still no luck with that either. So, if anyone has any ideas, I'd appreciate it. Thanks!

    Read the article

  • CSS class not working as expected [closed]

    - by user1050619
    My HTML codes not implement the CSS styling..The border in the CSS file is not being implemented. I tried both in Firefox & IE. Please provide your inputs. Please find the code below: HTML <html> <head> <link href="file://c:/jquery/chapter-1/begin/styles/my_style.css" rel="stylesheet"> </head> <body> <div id="header" class="no_hover"><h1>Header</h1></div> <button type="button" id="btn1">Click to Add</button> <button type="button" id="btn2">Click to Remove</button> <script src="file://c:/jquery/chapter-1/begin/scripts/jquery.js" type="text/javascript"></script> <script src="file://c:/jquery/chapter-1/begin/scripts/test4.js" type="text/javascript"></script> </body> </html> jS FILE $(document).ready(function() { $("#btn1").click( function(){ $("#header").addClass("hover"); $("#header").removeClass("no_hover"); }); $("#btn2").click( function(){ $("#header").removeClass("hover"); $("#header").addClass("no_hover"); }); }); CSS FILE .hover{ border: solid #f00 3px; } .no_hover{ border: solid #000 3px; }

    Read the article

  • Best way of showing more results with javascript/css

    - by Ricardo Neves
    I'm developing a website and i'm having troubles showing the search results to the user the way I want. Basically, after the user search, the page makes a couple of ajax requests and as soon as a response arrive it appends the info to a specific element on my page. Each results is shown as a line... The problem is that in most case there are going to be more than 1000 results and this would make the page have a large scroll. My idea was to show only the first 15 results and when the user clicks "show more" the element would expand and show the next 15 results and so on... This would be easier to do if the website wasn't responsive, but because it is I can't find the proper way of implementing what I want without lowering the website perfomance. I have "2 ideas": The first is by using something like #element .div:nth-child(-n+15) on my css and figure a way of changing the "15" to how much results I want to show... I don't know if this can be done. Is it possible to call css rules with parameters? Maybe with less css? The second option is probably a bad option if i don't want to lower the website performance. Using javascript I would check if there is a specific css class(like .show-15 .show30 .show45) and add that class to my element and if it don't exist, create it somehow.. Any help would be appreciated.

    Read the article

  • Cannot override the CSS at this site

    - by gdanko
    This site is overriding my CSS with its own and I cannot get around it! It has style.css with "text-align: center" in the body. I have <div id="mydiv"> appended to the body and it's normally got "text-align: left". There are <ul>s and <li>s underneath #mydiv and they are inheriting the body's 'center' for some reason. I tried this and it's still not working. $('#mydiv').children().css('text-align', 'auto'); How the heck do I reclaim my CSS!? @Grillz, the HTML looks like this: <div id="mydiv"> <ul class="container"> <li rel="folder" class="category"><a href="#">category1</a> <ul><li rel="file" class="subcategory"><a href="#">subcategory1</a></li></ul> <ul><li rel="file" class="subcategory"><a href="#">subcategory2</a></li></ul> </li> <li rel="folder" class="category"><a href="#">category2</a> <ul><li rel="file" class="subcategory"><a href="#">subcategory3</a></li></ul> <ul><li rel="file" class="subcategory"><a href="#">subcategory4</a></li></ul> </li> </ul>

    Read the article

  • CSS Differences Between IE and FF

    - by Joe Majewski
    I hope I'm not breaking any rules by asking a question that pertains to a project I'm working on. If you view my page here and view it in Firefox and again in Internet Explorer, the width of the main content boxes differs. In Firefox, everything aligns perfectly with the advertisement at the top of the page, but in IE, the width of the content boxes seems to fall short by about 20 or so pixels. My question is obvious by now, but what is causing the width in IE to fall short, and what would a simple solution be? If I happen to be breaking the rules by asking a question that is not generic enough to benefit others, then allow me to rephrase it; what would be the best approach to solving visual differences between browsers? Should I use a separate CSS file for IE, or is there a way to define lines in my CSS file that only get rendered by a specific browser? It would be best if someone could provide me with the necessary CSS to align things properly, but I would be more than happy to learn about how to make the CSS dynamic (if that's possible). Thanks everyone. :)

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >