Search Results

Search found 11699 results on 468 pages for 'css selectors'.

Page 11/468 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • CSS line break problem

    - by csetzkorn
    Hi, If I have a very long string (without spaces!) can I force the browser to line break it, for example, in a table's td via CSS. Width does not seem to have any effect. Thanks! Christian

    Read the article

  • Positioning divs inside a container div without the content of an upper div affecting the position o

    - by silverCORE
    Hi. I'm trying to accomplish the following layout, and I'm almost there, except for the last green div, which is going lower and lower depending on the content of the content (white) div. If I set a value for the TOP property for the green div, and then I add some more text to the content div, the green div goes lower and lower. Since the green div is child to the main container div, and the green div is relatively positioned, isn't it supposed to be placed specifically at the position indicated by the TOP value of it? If I'm incorrect...can someone please tell me how can i make it so that the green div is always displayed at the same spot within the container (gray) div, regardless of the height of the content/white div? I tried to paste the css code here but was having problems with the brower. you can see the test site source/css at http://www.rae-mx.com/test tia for the help.

    Read the article

  • Transitioning accordions from small height to full height with CSS

    - by arkanciscan
    I am building an accordion list and I want it to animate open and closed using a CSS -webkit-transition:. The animation is triggered by an event handler that simply toggles the .open class on and off. The problem is that when I click it, the animation goes from closed height to 0px height then jerks back to full height instead of smoothly animating to full height. HTML <ul class="accordion"> <li>Foo <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc quis leo sit amet justo vulputate volutpat. Suspendisse potenti. Aliquam aliquet justo ut turpis suscipit adipiscing.</p> </li> <li class="open">Baz <p>Ut velit magna, sagittis at blandit accumsan, vestibulum et dolor. Aliquam elit ante, congue vel pharetra ut, ultricies non est. In hac habitasse platea dictumst. Donec velit ligula, sodales a imperdiet non, sagittis id mauris.</p> </li> <li>Bar <p>Cras sit amet gravida lacus. Nulla consequat molestie nunc nec fermentum. Donec lobortis pretium quam sit amet scelerisque.</p> </li> </ul>? Javascript $('.accordion').delegate('li', 'click', function(li){ $(this).toggleClass('open'); }); Css .accordion li.open{ -webkit-transition: height 1s; } .accordion li:not(.open){ height: 1em; -webkit-transition: height 1s; } ? Try it on JSFiddle and see what I mean. I've already figured out how to make it work, but it requires setting an explicit height on the .open class. The accordions have variable height however, and creating an explicit selector for each one is obtrusive and unmaintainable. Can anyone give me a better solution than this? Here it is working with an explicit height that doesn't fit the content

    Read the article

  • Why don't we use dynamic (server-side generated) CSS?

    - by ern0
    As server-side generated HTML is trivial (and it was the only way to make dynamic webpages before AJAX), server-side generated CSS is not. Actually, I've never seen it. There are CSS compilers, but they generate CSS files which can be used as static. Technically, it requires no special libraries, the HTML style tag should reference to the PHP(/ASP/whatever) templater script instead of the static CSS file, and the script should send out CSS content-type header - that's all. Does it have cache problems? I don't think so. The script should send out no-cache etc. headers. Is it problem for designers? No, they should edit the CSS template (as they edit the HTML template). Why we don't use dynamic CSS generators? Or if there's any, please let me know.

    Read the article

  • Practices for keeping JavaScript and CSS in sync?

    - by Rene Saarsoo
    I'm working on a large JavaScript-heavy app. Several pieces of JavaScript have some related CSS rules. Our current practice is for each JavaScript file to have an optional related CSS file, like so: MyComponent.js // Adds CSS class "my-comp" to div MyComponent.css // Defines .my-comp { color: green } This way I know that all CSS related to MyComponent.js will be in MyComponent.css. But the thing is, I all too often have very little CSS in those files. And all too often I feel that it's too much effort to create a whole file to just contain few lines of CSS - it would be easier to just hardcode the styles inside JavaScript. But this would be the path to the dark side... Lately I've been thinking of embedding the CSS directly inside JavaScript - so it could still be extracted in the build process and merged into one large CSS file. This way I wouldn't have to create a new file for every little CSS-piece. Additionally when I move/rename/delete the JavaScript file I don't have to additionally move/rename/delete the CSS file. But how to embed CSS inside JavaScript? In most other languages I would just use string, but JavaScript has some issues with multiline strings. The following looks IMHO quite ugly: Page.addCSS("\ .my-comp > p {\ font-weight: bold;\ color: green;\ }\ "); What other practices have you for keeping your JavaScript and CSS in sync?

    Read the article

  • Server reporting incorrect mime type for css files

    - by Becky
    We have a VPS server that we host our websites on. I have written a CMS using CodeIgniter. On one of the interfaces, I am attempting to upload a css file to the system. This worked correctly when we had it hosted on shared hosting. Since we've moved it to the VPS, I am getting an "incorrect filetype" error. It all comes down to the fact that the server is reporting a mime type of text/x-c for the css file rather than text/css. I logged in via shell and ran the following command on an existing valid css file (to make sure it wasn't an issue with either CodeIgniter or with php). file --brief --mime 'filename.css' 2>&1 The server gave me the following in response to my command: text/x-c; charset=us-ascii My question ... is there some sort of server setting that I need to tweak to get the server to correctly identify the css file as text/css? Do I just have to add a mime type for the css files to the server? I found the mime types file (etc/mime.types), and it just hase video types and a couple other that I have no idea what they are. There is nothing in there for css or images or html files. Unless I'm looking in the wrong spot. I'm not a server person, so I'm hoping someone can help me out. Some server specs: Apache/2.2.22 (Unix) php 5.3.13 Server API = CGI/FastCGI the fileinfo php extension appears to be disabled

    Read the article

  • How to style this form using CSS ? [closed]

    - by Rafael
    Hi all ,i'm a beginner at CSS and trying to do a NETTUTS , but there's a portion in the webpage that i don't know what exactly to do in CSS to make it look right ... I just can't get this input text boxes, textarea and the button to be aligned like that , and to be honest the tutor isn't doing a great job to clearing stuff out Using alternative and absolute positioning, and setting top and right spacing is kinda no a good idea i think ... I'm trying to align them using FlexBox feature but don't know why those elements are not moving at all ... Here's my HTML & CSS3 code (for chrome) : <section id="getAfreeQuote"> <h2>GET A FREE QUOTE</h2> <form method="post" action="#"> <input type="text" name="yourName" placeholder="YOUR NAME"/> <input type="email" name="yourEmail" placeholder="YOUR EMAIL"/> <textarea name="projectDetails" placeholder="YOUR PROJECT DETAILS."></textarea> <input type="text" name="timeScale" placeholder="YOUR TIMESCALE"/> <button>Submit</button> </form> #getAfreeQuote form { display:-webkit-box; -webkit-box-orient:vertical; height:500px; } #getAfreeQuote input[name="yourName"]{ -webkit-box-ordinal-group:1; } #getAfreeQuote input[name="yourEmail"]{ -webkit-box-ordinal-group:1; } #getAfreeQuote textarea{ -webkit-box-ordinal-group:2; } #getAfreeQuote input[name="timeScale"]{ -webkit-box-ordinal-group:3; } #getAfreeQuote button { -webkit-box-ordinal-group:4; } and the result :

    Read the article

  • Practical considerations for HTML / CSS naming conventions (syntax)

    - by Jeroen
    Question: what are the practical considerations for the syntax in class and id values? Note that I'm not asking about the semantics, i.e. the actual words that are being used, as for example described in this blogpost. There are a lot of resources on that side of naming conventions already, in fact obscuring my search for practical information on the various syntactical bits: casing, use of interpunction (specifically the - dash), specific characters to use or avoid, etc. To sum up the reasons I'm asking this question: The naming restrictions on id and class don't naturally lead to any conventions The abundance of resources on the semantic side of naming conventions obscure searches on the syntactic considerations I couldn't find any authorative source on this There wasn't any question on SE Programmers yet on this topic :) Some of the conventions I've considered using: UpperCamelCase, mainly as a cross-over habit from server side coding lowerCamelCase, for consistency with JavaScript naming conventions css-style-classes, which is consistent with naming of css properties (but can be annoying when Ctrl+Shift+ArrowKey selection of text) with_under_scores, which I personally haven't seen used much alllowercase, simple to remember but can be hard to read for longer names UPPERCASEFTW, as a great way to annoy your fellow programmers (perhaps combined with option 4 for readability) And probably I've left out some important options or combinations as well. So: what considerations are there for naming conventions, and to which convention do they lead?

    Read the article

  • Unobstrusive pseudo-classes and attribute selectors emulation in IE

    - by Álvaro G. Vicario
    I'm trying to emulate some pseudo-classes and attribute selectors in Internet Explorer 6 and 7, such as :focus, :hover or [type=text]. So far, I've managed to add a class name to the affected elements: $("input, textarea, select") .hover(function(){ $(this).addClass("hover"); }, function(){ $(this).removeClass("hover"); }) .focus(function(){ $(this).addClass("focus"); }) .blur(function(){ $(this).removeClass("focus"); }); $("input[type=text]").each(function(){ $(this).addClass("text"); }); However, I'm still forced to duplicate selector in my style sheets: textarea:focus, textarea.focus{ } And, to make things worse, IE6 seems to ignore all the selectors when it finds an attribute: input[type=text], input.text{ /* IE6 ignores this */ } And, of course, IE6 ignores selectors with multiple classes: input.text.focus{ /* IE6 ignores this */ } So I'm likely to end up with this mess: input[type=text]{ /* Rules here */ } input.text{ /* Same rules again */ } input[type=text]:focus{ } input.text_and_focus{ } input.text_and_hover{ } input.text_and_focus_and_hover{ } My question: is there any way to read the rules or computed style defined for a CSS selector and apply it to certain elements, so I only need to maintain one set of standard CSS?

    Read the article

  • What is better: CSS hacks or browser detection?

    - by Darryl Hein
    Commonly when I look around the Internet, I find that people are generally using CSS hacks to make their website look the same in all browsers. Personally, I have found this to be quite time consuming to find all of these hacks and test them; each change you make you have to test in 4+ browsers to make sure it didn't break anything else. About a year ago, I looked around the Internet for what other major sites are using (Yahoo, Google, BBC, etc) and found that most of them are doing some form of browser detection (JS, HTML if statements, server based). I have started doing this as well. On almost all of the sites I have worked on recently, I use jQuery, so I use the built in browser detection. Is there a reason you use or don't use either of these?

    Read the article

  • css: background-image for tag img doesn't work in IE

    - by Syom
    i have the following script css: img { background-image:url("man.png"); background-repeat:no-repeat; padding-top:6px; padding-bottom:60px; padding-left:10px; padding-right:10px; margin-right:5px; border: 0; } it works fine in all browsers, but in IE doesn't. could you tall me why? thanks

    Read the article

  • css: background-image for tag img doesnt't work in IE

    - by Syom
    i have the following script css: img { background-image:url("man.png"); background-repeat:no-repeat; padding-top:6px; padding-bottom:60px; padding-left:10px; padding-right:10px; margin-right:5px; border: 0; } it works fine in all browsers, but in IE doesn't. could you tall me why? thanks

    Read the article

  • Re-setting CSS code for form buttons

    - by WebDevHobo
    I used a CSS reset to reset some commonly-used items. The code is this: html, body, div, h1, h2, h3, h4, ul, ol, li, form, input, fieldset, textarea { margin: 0; padding: 0; border: 0; font-size: 100%; } ul {list-style: none outside none;} img, fieldset {border: 0;} h1, h2, h3, h4 {font-weight: normal;} em {font-style: italic;} strong {font-weight: bold;} I know there's YUI and Meyer's reset, but I use this one. Now, the problem I'm experiencing is that I can't get the submit buttons to look normally again. I could ofcourse remove the input from the list and be done with it, but I'd like to know how to get it back, since I might need that in the future.

    Read the article

  • CSS Sprite vertical repeat problem

    - by ShiVik
    Hello all I am trying to include css sprites in my webapp. The thing is I have arranged my website background vertically in sprite image. Now, one portion of the sprite needs to be repeated vertically. I was trying the following code... #page-wrapper {   margin: 0px auto;   background-image: url(../images/background.png);   height: 100%;   width: 1000px; } #page-wrapper #content {   background-position: 0px -80px;   background-repeat: repeat-y;   height: 1px; } I am confused in the height property of content class. How should I define the height of the section which I want to repeat and the height of the div(#content)? Regards Vikram

    Read the article

  • css to display three coloumn content

    - by arpymastro
    I am trying to get three column output using <div> for each. Right now my div on the left is lined properly even the middle one, but when I try to put right it is just clipping down. CSS /* left div */ #left-sidebar, #right-sidebar { width:15%; height:700px; float: left; padding-left: 15px; padding-top: 20px; } /* middle div */ #mid-content { width:75%; padding-left: 30px; padding-top: 20px; } /* right div */ #right-sidebar { float:right; }

    Read the article

  • CSS file pathing problem

    - by Alan Harris-Reid
    Hi there, When designing a HTML template in my favorite editor (TextPad at the moment) I can view my code in a browser by pressing F11 or the appropriate toolbar button. I have my common css rules in a separate file so my HTML contains the code: <link rel="stylesheet" href="commoncss.css" type="text/css"> This works when the .css file is in the same folder as the .html file, or if I fully path the .css file in the href property, eg. ///c:/mycssfolder/commoncss.css However, in a 'live' situation I want the .css file to reside in a common folder which is accessible from a number of .html files (eg. href='css/commoncss.css', where the css folder is configured at web-server level). How can I achieve this design vs. live dilemma without copying css file to all .html folders (and all the maintenance headaches that comes with it)? I am using Python 3.1 with Jinja2, but I guess this problem is applicable across any language and template-engine. Any help would be appreciated. Alan

    Read the article

  • CSS Trouble, Why does it move itself?

    - by Patrick
    Hello! I am stuck on the CSS part, am helping a friend to implement one thing on her webpage. Its a dropdown menu and i got everything working the way i want it to. My problem is that it moves itself to the beginning of the row? http://gazet.se/TestPages/Test.aspx Its just below the logo and as you can see, its on the correct line but not in the correct position (should be between the purple "Nyhetsbrev" and the black "Experthörnan"-images, but it ends up on the beginning of the row instead? Any ideas?

    Read the article

  • CSS size transition to stay inside parent div

    - by IlyaD
    I want to have an image frame that when I hove over it the image inside will zoom in a little (I am using size transition), but the frame will stay the same size. What happens now that even if the frame has a fixed width and height it is stilled zoomed with the image HTML: <div class="img-wrapper"> <img class="thumbnail" src="http://placekitten.com/400/200"> </div> and CSS .img-wrapper { width: 400px; } .thumbnail { width: 400px; } .thumbnail { -webkit-transition: all 0.2s ease-out; -moz-transition: all 0.2s ease-out; transition: all 0.2s ease-out; } .thumbnail:hover { width: 500px; -webkit-transition: all 0.2s ease-out; -moz-transition: all 0.2s ease-out; transition: all 0.2s ease-out; } http://codepen.io/pen/KCJny

    Read the article

  • Altering CSS for nav bar images to accomodate IE

    - by Kim
    My horizontal nav bar is populated with images for the links that are coming from one image that includes all the sub-images; each nav item image is identified by the pixel location within the larger image. This works perfectly fine in Firefox and Safari, but in IE, all of the images are misplaced too low within the nav bar (can only barely see the tops of the words). Two questions: How do I fix this in the css so it is back-compatible with the more recent versions (and current versions) of IE Do I need a separate IE stylesheet? Thanks!

    Read the article

  • How to maximize a floating div width when one div is removed or hidden?

    - by Maju
    I have two div columns sidebar(left) and page-content(right). I toggle removing and adding 'sidebar' using jquery but unable to maximize '#page-content' to take up the empty space when sidebar is removed.I tried removing 'margin-left:250px;' but the #page-content is going to the bottom. In short i want Toggle before | sidebar | page-content | Toggle after | page-content                | but it happens like | sidebar | | page-content                | Please help. Here is the css and jquery used. Thanx css #sidebar { float:left; width:185px; color:#333; padding:25px 25px; } #page-content { margin-left:250px; padding:25px 35px 25px 25px; color:#333; } jQuery $(document).ready(function() { $('a#side-toggle').click(function() { $('#sidebar').toggle(400); return false; }); });

    Read the article

  • css - set max-width for select

    - by Patrick
    I have a form with a drop down list of venues and a submit button. They are supposed to be on the same line, but since the list of venues is dynamic, it could become too long and push the button down. I was thinking of setting a max-width property to the select, but I'm not clear whether this will work in all browsers. Do you have any suggestions on a workaround? form action="http://localhost/ci-llmg/index.php/welcome/searchVenueForm" method="post" class="searchform"><select name="venue"> <option value="0" selected="selected">Select venue...</option> <option value="1">venue 0</option> <option value="2">club 1</option> <option value="3">disco 2</option> <option value="4">future test venue</option> </select> <input type="submit" name="" value="Show venue!" class="submitButton" /> </form> css: .searchform select { max-width: 320px; } .searchform input.submitButton { float: right; }

    Read the article

  • Positioning Layers and text gradients with css

    - by Kenji Crosland
    I'm a CSS newbie trying to get some text gradients going on. I tried this code here but it didn't work for me, most likely because the h1 object is nested within a #header div. I imagine there's something to do with layers that I don't know about. Either I get a gradent block that is in front of everything or it's not appearing at all. In this particular instance this code makes a big gradient bar appear in front of everything: #header { clear:both; float:left; -moz-background-inline-policy:continuous; -moz-background-origin:padding; background:#080E73 url(../images/header-background.png) repeat-x left 0px; width:100%; max-height: 175px; color: #080E73; } #header h1 { margin-bottom: 0; color: #000; position: relative; } #header h1 span { background:url(../images/headline-text.png) repeat-x; display: block; width: 100%; height: 100%; position: absolute; } Here is the HTML (I'm using ruby on rails hence the notation) <div id="header"> <% unless flash[:notice].blank? %> <div id="notice"><%= flash[:notice] %></div> <% end %> <%= image_tag ("header-image.png") %> <h1><span></span>Headline</h1> <strong>Byline</strong> ... #navbar html... </div> I tried playing with z-index but I couldn't come up with any good results. Any ideas?

    Read the article

  • Tricky CSS Layout

    - by Meep3D
    So I am making a website with quite a problematic layout. There are four corner images TL, TR, BL and BR indicated by black blocks. The dark orange area is the main content (to a width of 960px), with the outside area denoted by the green arrow as the browser window. See diagram: The top image represents the site at its narrowest possible - it shouldn't be allowed to be narrower than this (960px) if it is larger than the defined area there should be no scrollbars. The bottom two images represent different widths of browser. The bottom left and right black blocks (images) should be at the bottom left and right of the screen at all times, unless the width falls to 960px, in which case the BL and BR images should poke into the main area slightly. If the site is shrunk to, say 200px, the BR image should not still be poking in the right corner. At this point I don't really care about it working exactly in IE6 (I can get it roughly working) but I can't even figure out how to do it fully without Javascript or extremely experimental CSS. Currently I am using absolutely positioned div's which sort of work, but don't work quite right. I think I'd be willing to accept a bit of JS if there is no other way but I'd rather not. Answer very appreciated!

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >