Search Results

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

Page 6/468 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • CSS and HTML incoherences when declaring multiple classes

    - by Cesco
    I'm learning CSS "seriously" for the first time, but I found the way you deal with multiple CSS classes in CSS and HTML quite incoherent. For example I learned that if I want to declare multiple CSS classes with a common style applied to them, I have to write: .style1, .style2, .style3 { color: red; } Then, if I have to declare an HTML tag that has multiple classes applied to it, I have to write: <div class="style1 style2 style3"></div> And I'm asking why? From my personal point of view it would be more coherent if both could be declared by using a comma to separate each class, or if both could be declared using a space; after all IMHO we're still talking about multiple classes, in both CSS and HTML. I think that it would make more sense if I could write this to declare a div with multiple classes applied: <div class="style1, style2, style3"></div> Am I'm missing something important? Could you explain me if there's a valid reason behind these two different syntaxes?

    Read the article

  • How to go about unused CSS issues

    - by Saif Bechan
    I am running some speedtests on a blog, and I always get complaints about unused CSS. But this is not CSS that I never use, it is just not used on that particular page. Now I work in a structured way, but there still has to be some CSS in the file that will not be used, because you need it on another page. I do not think that using different CSS files on different pages is the way to go, I think you are much better off just creating one big file that can be cached. Now is there an elegant way of dealing with this, or do you just stick with it.

    Read the article

  • Recommended requirements when outsourcing xhtml/css site building?

    - by András Szepesházi
    I'm considering outsourcing a part of our web application development project for freelancers, namely the site building part. What I mean by site building is the process of creating the xhtml/css template files, with dummy content, from a psd file (or any other graphical layout file). The resulting xhtml/css files will be used by our developers as templates for cms based page rendering. The cms in this case is Drupal, but that might not be of much relevance. I'm looking for a good set of requirements, that will result in good quality xhtml/css code, complying with today's standards leaves little to the freelancer developer's imagination in terms of what I need I'm thinking about requirements like: Valid XHTML 1.0 Transitional document type, validated by validator.w3.org Identical rendering in all modern browsers (FF, Chrome, Safari, Opera, IE7-8) and also in IE6 All opening and closing block-level elements should be properly commented, referencing the functional part of the user interface they belong to (menu, toolbar, content, etc) No inline CSS definitions And so on. How would you organize a list like that? What requirements would you add?

    Read the article

  • Can resizing images with css be good?

    - by Echo
    After reading Is CSS resizing of images still a bad idea?, I thought of a similar question. (too similar? should this be closed?) Lets say you need to use 10 different product image sizes throughout your website and you have 20k-30k different product images, should you use 10 different files for each image size? or maybe 5 different files and use css to resize the other 5? Would there ever be combination that would be good? Or should you always make separate image files? If you use css to resize them, you will save on storage (in GBs) but you will have slight increase in bandwidth and slower loading images(but if images are cached, and you show both sizes of the image would you use less bandwidth and have faster loads?) (But of course you wouldn't want to use css to resize images for mobile sites.)

    Read the article

  • Change CSS EMs to Percentage Automatically.

    - by Zachary Brown
    I cheated on a small site I was working on and used a site builder (Web Dwarf by Virtual Mechanics) to save time. I didn't realize it at the time, but this builder specifies the width, height and positions using CSS EMs. Is there an automated tool out there that will read through the CSS and convert each EM to a percentage so it will display correctly on wide screens as well? Any help would be great! Thanks. Here is the CSS: http://pastebin.de/14055

    Read the article

  • Can CSS be copyrighted?

    - by Emily
    I know CSS on a website is protected under the website's copyright since it is considered part of the overall design. I also know that images used inCSS are copyrightable. How about when CSS is used to create images? There is a CSS3 icon set that has a $25 license fee. Another developer claims those images to be copyrighted and that it is illegal to use any of the icons unless you pay the fee. I say you cannot copyright a chunk of code and if I recreate an arrow or disc icon in my CSS (whether I copy his code or write my own) he has no recourse. Can CSS, by itself, be copyrighted?

    Read the article

  • Magento CSS Merge breaks layout in IE browsers

    - by Subi
    I am developing a magento website, and it is using CSS merge option. currently in IE the CSS not rendering properly. When I remove some part of CSS file its working. Some times it works when I remove 50 line from top. Some times it works when I remove 100 lines from bottom. So it's nothing related to the CSS I wrote. Merged file contains about 6000 lines and having 380 KB file size. can anybody help me on this ? Thanks

    Read the article

  • Resources for Learning CSS [closed]

    - by historicus
    I am a server-side programmer that is proficient in Java. I have fairly good knowledge of client-side scripting - primarily Javascript - but my ability in CSS is lacking. While I have the know-how to modify basic styles, I'd like to understand a bit more about CSS layouts and styling. Can anyone with expert knowledge of CSS provide a good source for diving into the topic? Also, are there any short, online courses that might help in gaining the information I seek?

    Read the article

  • CSS specificity: Why isn't CSS specificity weight of 10 or more class selectors greater than 1 id selector? [migrated]

    - by ajc
    While going through the css specificity concept, I understood the fact that it is calculated as a 4 parts 1) inline (1000) 2) id (100) 3) class (10) 4) html elments (1) CSS with the highest rule will be applied to the corresponding element. I tried the following example Created more than 10 classes <div class="a1"> .... <div class="a13" id="id1"> TEXT COLOR </div> ... </div> and the css as .a1 .a2 .a3 .a4 .a5 .a6 .a7 .a8 .a9 .a10 .a11 .a12 .a13 { color : red; } #id1 { color: blue; } Now, even though in this case there are 13 classes the weight is 130. Which is greater than the id. Result - JSFiddle CSS specificity

    Read the article

  • CSS background-images and Z-Index problem

    - by dscher
    Hope someone has an easy answer on this. I have a header image which is just a 75px high gradient with a fade on the bottom. I have it set as the background image on my header and I want to throw in a left-sidebar on my page. There is a transparency on the header image and when I have my sidebar I can't get it to sit behind the header. You can see in this screenshot: link text The green sidebar won't "sit" behind the header. I have the header z-index set to 99 and the sidebar to 1. I tried the reverse to make sure I didn't mix up my numbers but that didn't work. Both are absolutely positioned. I'm attaching their CSS selectors in the hopes someone has an easy answer. Am sure I'm missing something basic: div.header { z-index: 99; background: transparent; background-image: url(images/header_bg.png); position: absolute; height: 85px; width: 100%; font-family: Helvetica, Verdana, Arial, sans-serif; } div#leftsidebar { height: 400px; border-right-style: dashed; border-right-width: 1px; z-index: -1; margin-top: 75px; width: 200px; position: absolute; background-color: #66ff66; } Thanks.

    Read the article

  • Css absolute position don't work in MS WORD

    - by Tim
    Hello! This is a sample: <html> <head> <title>word test</title> </head> <body> <div style='position: absolute; width: 30px; height: 50px; top: 100px; left: 20px; border-color: black; border-width: 1px; border-style: solid;'> <p>Hello!</p> </div> </body> </html> Save it as "word.doc" and open in MS WORD. Absolute position don't work! Div is rendered on the top of document and with 100% width. Why? I can't use a html tables. Version on ms word: 2003

    Read the article

  • Correct way to import Blueprint's ie.css via DotLess in a Spark view

    - by Chris F
    I am using the Spark View Engine for ASP.NET MVC2 and trying to use Blueprint CSS. The quick guide to Blueprint says to add links to the css files like so: <link rel="stylesheet" href="blueprint/screen.css" type="text/css" media="screen, projection"> <link rel="stylesheet" href="blueprint/print.css" type="text/css" media="print"> <!--[if lt IE 8]><link rel="stylesheet" href="blueprint/ie.css" type="text/css" media="screen, projection"><![endif]--> But I'm using DotLess and wish to simplify Blueprint as suggested here. So I'm doing this in my site.less (which gets compiled to site.min.css by Chirpy): @import "screen.css"; #header { #title { .span-10; .column; } } ... Now my site can just reference site.min.css and it includes blueprint's screen.css, which includes my reset. I can also tack on an @import "print.css" after my @import "screen.css" if desired. But now, I'm trying to figure out the best way to bring in the ie.css file to have Blueprint render correctly in IE6 & IE7. In my Spark setup, I have a partial called _Styles.spark that is brought into the Application.spark and is passed a view model that includes the filenames for all stylesheets to include (and an HtmlExtension to get the full path) and they're added using an "each" iterator. <link each="var styleSheet in Model.Styles" href="${Html.Stylesheet(styleSheet)}" rel="stylesheet" type="text/css" media="all"/> Should I simply put this below the above line in my _Styles.spark file? <!--[if lt IE 8]><link rel="stylesheet" href="${Html.Stylesheet("ie.css")}" type="text/css" media="screen, projection"><![endif]--> Will Spark even process it because it's surrounded by a comment?

    Read the article

  • How much multiple style sheets slow down to website?

    - by metal-gear-solid
    Here is 3 css file (one is only for IE) <link rel="stylesheet" href="css/blueprint/screen.css" type="text/css" media="screen, projection"> <link rel="stylesheet" href="css/blueprint/print.css" type="text/css" media="print"> <!--[if lt IE 8]><link rel="stylesheet" href="css/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]--> If i keep divide scree.css into these css in my website Now it will be 6 css ( one is only for IE) <link rel="stylesheet" href="css/blueprint/reset.css" type="text/css" media="screen, projection"> <link rel="stylesheet" href="css/blueprint/grid.css" type="text/css" media="screen, projection"> <link rel="stylesheet" href="css/blueprint/typography.css" type="text/css" media="screen, projection"> <link rel="stylesheet" href="css/blueprint/forms.css" type="text/css" media="screen, projection"> <link rel="stylesheet" href="css/blueprint/print.css" type="text/css" media="print"> <!--[if lt IE 8]><link rel="stylesheet" href="css/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]--> If i go for method two for a website even after production . Does it really slowdown the website page loading speed? if yes then how much? How much these 3 extra style sheet will affect site performance?

    Read the article

  • CSS new line issues

    - by user328371
    Hi, I'm trying to create a breezebrowser template (used for generating image galleries locally, outputs HTML). I've taken the HTML from my wordpress template and managed to generate the following gallery http://uploads.peasyphotos.com/20100607t-candids/gallery/ but each image goes on a new line and i don't know why, i presume it's in the CSS. What should I be looking for in the CSS to try and stop this, or what can I put around my template code to disable the CSS for that part? Thanks

    Read the article

  • CSS inheritance: applying selector for itself and every descendant

    - by Cawas
    Get a custom user CSS and type this .answered-accepted { color: white !important; background: #090 !important; } Now go to answers.unity3d and look for an accepted answer. The design looks bad, because the <strong> in there overrides the customization. The fix I've found is this: .answered-accepted, .answered-accepted * { color: white !important; background: #090 !important; } Now it looks fine on the website, but the code looks ugly!! How can I do this without repeating the class name?

    Read the article

  • Parse HTML file to grab all ID and Classes for a CSS file

    - by iamfriendly
    Hey all, A short while ago, I'm fairly certain I came across an application (or perhaps a plugin for Coda - the IDE I use) which quickly parses a html document and then spits out all of the elements with IDs and Classes for me to use in a CSS file. Having fully 'got into' zen coding - using the wonderful TEA plugin for Coda, I'm now hot on the heels of this app/plugin again. I've tried and failed miserably at hunting through Google, but have come up completely empty handed. Does anyone know of anything which can do this? Happy New Year everyone!

    Read the article

  • css newline issues (I think!)

    - by user328371
    Hi, I'm trying to create a breezebrowser template (used for generating image galleries locally, outputs HTML). I've taken the HTML from my wordpress template and managed to generate the following gallery http://uploads.peasyphotos.com/20100607t-candids/gallery/ but each image goes on a new line and i don't know why, i presume it's in the CSS. What should I be looking for in the CSS to try and stop this, or what can I put around my template code to disable the CSS for that part? Thanks

    Read the article

  • CSS and jQuery slider height/positioning question

    - by wilwaldon
    TEST SITE If you look at the example above the slider on the right has 2 images. The first one is smaller than the second. The second is around 500px high. What I'm looking to do is expand the slider vertically depending on the height of the images inside. I believe the js is setting the height of the image when it is called from the server and I can't find a way to override it with the CSS. Any help would be very appreciated. Thank you!

    Read the article

  • Group multiple media queries formed as output of LESS css

    - by Goje87
    I was planning to use LESS css in my project (PHP). I am planning to use its nested @media query feature. I find that it fails to group the multiple media queries in the output css it generates. For example: // LESS .header { @media all and (min-width: 240px) and (max-width: 319px) { font-size: 12px; } @media all and (min-width: 320px) and (max-width: 479px) { font-size: 16px; font-weight: bold; } } .body { @media all and (min-width: 240px) and (max-width: 319px) { font-size: 10px; } @media all and (min-width: 320px) and (max-width: 479px) { font-size: 12px; } } // output CSS @media all and (min-width: 240px) and (max-width: 319px) { .header { font-size: 12px; } } @media all and (min-width: 320px) and (max-width: 479px) { .header { font-size: 16px; font-weight: bold; } } @media all and (min-width: 240px) and (max-width: 319px) { .body { font-size: 10px; } } @media all and (min-width: 320px) and (max-width: 479px) { .body { font-size: 12px; } } My expected output is (@media queries grouped) @media all and (min-width: 240px) and (max-width: 319px) { .header { font-size: 12px; } .body { font-size: 10px; } } @media all and (min-width: 320px) and (max-width: 479px) { .header { font-size: 16px; font-weight: bold; } .body { font-size: 12px; } } I would like to know if it can be done in LESS it self or is there any simple CSS parser I can use to manipulate the output CSS to group the @media queries.

    Read the article

  • How do CSS sprites work?

    - by Rachel
    I have 3 different images and want to create a sprite using CSS. I understand that will reduce HTTP requests. However, I am totally new to this concept and have no idea as to how to approach this. What would be best bet for me? Also I have seen there are some CSS sprite generators where you submit a .zip of images and it combines them. I tried doing that, but did not understood what was happening. Any guidance regarding creating and using CSS sprites would be highly appreciated. Update: I have gone through the A List Part article but it was not very clear to me. Can someone provide an example of using a CSS sprite? [A short, self-contained example in an answer is preferable for SO than just a link to an example elsewhere. –ed.]

    Read the article

  • How can I scale an image in a CSS sprite

    - by michael
    Hi, In this article, http://css-tricks.com/css-sprites/, it talks about how can I crop off a smaller image from 1 bigger image. Can you please tell me if it is possible/how I can crop off a smaller image and then scale the cropped off region before I lay it out? Here is an example from that article: A { background-image: url(http://www.jaredhirsch.com/coolrunnings/public_images/3deb155981/spriteme1.png); background-position: -10px -56px; } I would like to know how can I scale that image after I crop it from from spriteme1.png Here is the URL of the example: http://css-tricks.com/examples/CSS-Sprites/Example1After/ So I would like to know if I can make the icons next to Item1,2,3,4 smaller?

    Read the article

  • CSS selector for grouped iterations

    - by snaken
    Hi, I have a number of elements that i want to loop through as groups. Consider this HTML: <input class="matching match-1" /> <input class="matching match-1" /> <input class="matching match-2" /> <input class="matching match-2" /> <input class="matching match-2" /> <input class="matching match-3" /> <input class="matching match-3" /> // etc I want a CSS selector that would allow me to loop through these as groups so there would be - using this example - 3 iterations of the loop (one for match-1, one for match-2 and one for match-3). The 1,2,3 etc is a variable used for grouping but this is not fixed so it cannot rely on hard coding of these values. Is this even possible? I'll be using jQuery or prototype not that that should matter really. Thanks

    Read the article

  • CSS does not load when updated in an ASP.NET MVC 2 website

    - by dannie.f
    I have a weird problem. Whenever the website designer updates the css file for the website I am working on. I overwrite the old css file with the new version and copy any new images. The problem is that whenever I do this the images in the website header no longer loads along with some other styles that depend on css loading some images. I have tried everything, clearing the browser cache, deleting asp.net temporary files, restarting the browser, changing browsers and pressing Ctrl + F5. Still the images don't load. What usually happens also is that the problem would eventually correct itself and I wouldn't know why. This driving me crazy. Does anyone else have the problem and know how to fix it? If this helps, the header is located in a partial view and the master page loads the css file using Url.Content. The images are css sprites. This issue persists no matter which browser I try, Chrome, Firefox or IE. I am using Visual Studio 2008 SP1 on Windows 7 Ultimate. Other team members have experienced this issue.

    Read the article

  • css transition initial value

    - by nizzle
    I would like to animate a div from right to left. I cannot use a stylesheet because I don't know the amount of px. If I set the initial value (where the animation starts from) and the end-value in the same function, it doesn't work. //DOES NOT WORK $("#hi").css({"width" : "200px", "transform" : "translateX(500px)"}); $("#hi").css({"transition" : "all 5s ease-out", "transform" : "translateX(0px)"}); //WORKS $("#alsohi").css({"width" : "200px", "transform" : "translateX(500px)"}); setTimeout(function(){ $("#alsohi").css({"transition" : "all 5s ease-out", "transform" : "translateX(0px)"}); }, 50); as you can see in this fiddle: http://jsfiddle.net/c66Fb/ what is a better solution to this than using a timeout?

    Read the article

  • Using css child selector

    - by David Thorisson
    I am trying to apply css on the first A element inside .Outer, .Outer > a:first-child {font-weight:bold} doesn't work. Why? <div class="Outer"> <img src='image123.jpg' /> <a href="Default.aspx?ID=4083" id="ctl00_CPH_Main_Rep_List2_ctl03_HyperLink1">John Johnsson</a> <a href="../Users/ViewList.aspx?module=Occupation&amp;ID=70">Doctor</a> <a href="../Workplaces/Default.aspx?ID=31">Mayo Clinica> </div>

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >