Search Results

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

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

  • Using CSS Classes for individual effects - opinions?

    - by Cool Hand Luke UK
    Hey, Just trying to canvas some opinions here. I was wondering how people go about adding individual effects to html elements. Take this example: you have three types of h1 titles all the same size but some are black some are gold and some are white. Some have a text-shadow etc. Would you create separate CSS classes and add them do the h1 tag or would you create a new single class for each different h1 title type (with grouped CSS elements)? With singular class for each effect you can build up combos of classes in html class="gold shadow" but also how would you name them. For example its bad practice to give classes and id names associated to colours, because it doesn't define what it does well. However is this ok with textual CSS classes? Just wondering what others do, I know there are no hard and fast rules. Cheers.

    Read the article

  • Using CSS Classes for indivdual effects - opinions?

    - by Cool Hand Luke UK
    Hey, Just trying to canvas some opinions here. I was wondering how people go about adding individual effects to html elements. Take this example: you have three types of h1 titles all the same size but some are black some are gold and some are white. Some have a text-shadow etc. Would you create separate CSS classes and add them do the h1 tag or would you create a new single class for each different h1 title type (with grouped CSS elements)? With singular class for each effect you can build up combos of classes in html class="gold shadow" but also how would you name them. For example its bad practice to give classes and id names associated to colours, because it doesn't define what it does well. However is this ok with textual CSS classes? Just wondering what others do, I know there are no hard and fast rules. Cheers.

    Read the article

  • How to reinforce pseudo css rules

    - by danwoods
    Is there anyway to reinforce pseudo css rules? ie: I have a listing of divs (playlist) which I color with the following rules: #playlist .playlist_item { background: #d6d6d6; } #playlist .playlist_item:nth-child(odd) { background: #b3b3b3; } Now, when a song is playing, I use setInterval and JQuery's .animate function to pulse the background color. When the song is finished I clear the interval, but of course the song's background remains the last color set in the interval. Is there a way to re-set the song's color based on the CSS rule? Otherwise I'll have to keep track of the previous song (which may have changed position, and thus color) or setup distinct background color classes and reset the classes of all the songs in the playlist anytime someone adds, removes, or moves a song in the playlist or a song ends. I'd much rather use a CSS only approach. Thanks in advance, Dan

    Read the article

  • Switching CSS to use asset pipeline in Rails?

    - by John
    I have a lot of legacy CSS files from what was a Rails 2.x app that got upgraded to Rails 3.2.8, and I want to switch over to using the Rails asset pipeline for stylesheets. The issue is, the CSS stuff is messy in terms of huge lines of code, duplicate file names, and unorganized folder structure. After looking through individual pages, and trying to add individual stylesheets and folders into the asset pipeline and spending some cycles debugging, I realized there's probably a better approach. Is there a way to test to make sure the old CSS matches up with the asset pipeline CSS? What are some good tools for testing and debugging CSS?

    Read the article

  • CSS just for most basic HTML

    - by Gerenuk
    I've read that my note system Wikidpad, which exports to very simple HTML, can use CSS (http://wikidpad.sourceforge.net/help/HtmlCss.html) The elements in the output are not more than basic headings, bullet points and tables. I'd like to try some kind of improved style, but I as I have no knowledge about CSS, so the best I can do is to save some Myfile.css to a directory :) However if I google "CSS template" I get all sorts of complicating results that I cannot make sense of :( Am I using wrong terminology? Can you suggest what I should search for or maybe you even know a ressource where a get a simple CSS file with some decent standard HTML elements. I do not wish to make custom adjustments.

    Read the article

  • CSS Div Width Problem - Lining divs... widths seem to be off in IE7

    - by jlrolin
    So far, I'm doing this programmatically using VB.net/ASP.net: 'Create Container Div Dim ContainerDiv As New HtmlGenericControl("div") ContainerDiv.Style("width") = "100%" ContainerDiv.Style("clear") = "both" ContainerDiv.Style("text-align") = "left" ContainerDiv.Style("margin") = "0" 'Create Expand/Collapse Image Dim img As New Image img.ImageUrl = Page.ResolveUrl("~/images/minus99.jpg") img.Attributes.Add("onclick", "change(this.parent);") 'Create Company Display Dim lbl As New Label lbl.Text = Parsetext(pc.NAME) lbl.Font.Bold = True lbl.Style("font-size") = "16px" Dim NameDiv As New HtmlGenericControl("div") 'NameDiv.Style("background-color") = "#F0D3D3" NameDiv.Style("width") = "375px" NameDiv.Style("float") = "left" NameDiv.Style("margin") = "0" NameDiv.Style("display") = "block" NameDiv.Controls.Add(img) NameDiv.Controls.Add(lbl) ContainerDiv.Controls.Add(NameDiv) Dim SetupDiv As New HtmlGenericControl("div") SetupDiv.Style("background-color") = "#F0D3D3" SetupDiv.Style("width") = "210px" SetupDiv.Style("float") = "left" SetupDiv.Style("margin") = "0" SetupDiv.Style("display") = "block" 'SetupDiv.Style("position") = "fixed" ContainerDiv.Controls.Add(SetupDiv) Dim UsedDiv As New HtmlGenericControl("div") UsedDiv.Style("background-color") = "#CFF5CE" UsedDiv.Style("width") = "140px" UsedDiv.Style("float") = "left" UsedDiv.Style("margin") = "0" UsedDiv.Style("display") = "block" 'UsedDiv.Style("position") = "fixed" ContainerDiv.Controls.Add(UsedDiv) Dim RemDiv As New HtmlGenericControl("div") RemDiv.Style("background-color") = "#BEE0F7" 'RemDiv.Style("position") = "absolute" RemDiv.Style("width") = "210px" RemDiv.Style("float") = "right" RemDiv.Style("padding") = "0" RemDiv.Style("margin") = "0" RemDiv.Style("display") = "block" 'RemDiv.Style("position") = "fixed" ContainerDiv.Controls.Add(RemDiv) This should give me four DIVS inside a container DIV. Here's what it's coming out as: The correct blocks above the non-inline blocks are from a table with the same exact widths as the ones I'm using on the Divs. There isn't any CSS adding pixels to them, I don't think. I need to line these up, and I can't figure out where my problem is here. Any help would be appreciated.

    Read the article

  • CSS being ignored in IE & FFox but not Chrome

    - by Grant
    Hi, i am styling a navigation menu using the following css. I have found that it works perfectly in chrome but absolutely none of the css is beign applied in firefox or IE. Is there something obvious that i havent done or have done here? <style type="text/css"> #ddm { margin: 0; padding: 0; } #ddm li { float: left; list-style: none; font: 8pt Tahoma, Geneva, sans-serif; } #ddm li a { display: block; padding: 5px 12px; text-decoration: none; border-right: 1px solid white; width: 70px; white-space: nowrap; color:Red; border: none; } #ddm li a:hover { color:White; background-color:#444444; } #ddm li ul { margin: 0; padding: 0; position: absolute; visibility: hidden; } #ddm li ul li { float: none; display: inline } #ddm li ul li a { width: auto; } #ddm li ul li a:hover { } </style> <ul id="ddm"> <li> <ul> <li><a href="#">test 1</a></li> <li><a href="#">test 2</a></li> </ul> </li> </ul>

    Read the article

  • Is it really necessary to have a competely validated Mark Up and css for SEO purposes

    - by Hitesh Manchanda
    Hi , While validating my CSS on http://jigsaw.w3.org/css-validator/ I am getting following errors: 1.Property zoom doesn't exist : 1 1. 2.Property -webkit-transition doesn't exist : all 200ms ease-in all 200ms ease-in 3.Property opacity doesn't exist in CSS level 2.1 4.Property -moz-border-radius doesn't exist 5.Property -webkit-border-radius doesn't exist Is it really required to validate the MarkUp and CSS completely for SEO or these errors which mostly are browser specific can be ignored for now. If these errors have to removed can someone please suggest the way to do so also.

    Read the article

  • CSS not working in ASP.NET

    - by Tux
    Hi, I have created a simple page in HTML which works fine. But when I import that to ASP.NET, the page design clutters up. Here is my Site.Master <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="Elite.WUI.Site" %> <!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></title> <link rel="stylesheet" type="text/css" href="styles.css" /> </head> <body> <form id="form1" runat="server"> <asp:ContentPlaceHolder ID="headerCPH" runat="server"> <div id="header"> <h1>WUI</h1> </div> <hr /> </asp:ContentPlaceHolder> <asp:ContentPlaceHolder ID="navigationCPH" runat="server"> <div id="navigation"> <ul> <li>Home</li> <li>Users</li> <li>Campaigns</li> <li>Settings</li> </ul> </div> </asp:ContentPlaceHolder> <asp:ContentPlaceHolder ID="contentCPH" runat="server"> </asp:ContentPlaceHolder> </form> </body> </html> my stylesheet styles.css #navigation { float: left; border: 1pt solid; } #navigation ul { list-style-type: none; padding: 5 5 5 5; margin: 0; } #content { margin-left: 9%; border: 1pt solid; padding-left: 5; } and the actual page derived from master page <%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ABC.aspx.cs" Inherits="Elite.WUI.ABC" %> <asp:Content ID="Content3" ContentPlaceHolderID="contentCPH" runat="server"> <div id="content"> <p>Test content</p> </div> </asp:Content> Here is how it is displayed in Firefox (ver 3.6) As you can see that the border, list-style-type properties are working but margin isn't working. Can anyone tell me what am I doing wrong? I have tested it in Google Chrome but same issue. While the HTML and CSS works fine when there is no ASP.NET i.e. simple .html file.

    Read the article

  • selectors-api for data attributes

    - by MJ
    In HTML5, CSS selectors seem to operate well with data-* attributes. For example: <style> div[data-foo='bar'] { background:#eee; } </style> <div data-foo='bar'>colored</div> <div>not colored</div> will properly style the first . But, attempts to select such elements using the selectors-api fail. Examples: var foos = document.querySelectorAll("div[data-foo]='bar'"); or var foos = document.querySelectorAll("div data-foo='bar'"); in Chrome and Safari, this produces a cryptic error: SYNTAX_ERR: DOM Exception 12 Any thoughts on how to use the selectors-api to properly select elements on the basis of data-* attributes?

    Read the article

  • GWT layout panels vs. CSS layout

    - by David
    I read an article entitled "Tags First GWT", in which the writer suggests using GWT for event-handling, and CSS for layout. I just don't know whether the benefit of GWT's cross-browser compatibility goodness outweighs the flexibility offered by pure CSS layout. GWT GWT 2.0 has some snazzy layout panels, but to get them to resize properly you really need to build the entire panel containment tree from the root panel down. It's an all-or-nothing thing, it seems. CSS You can use CSS to layout an application too, and I'm inclined to do just that, if only to justify my purchase of several books touting the 'semantic markup' gospel. The downside might be cross-browser incompatibilities, the prevalence of which I have yet to determine. Which way to go? What is your opinion? Are cross-browser problems bad enough, and prevalent enough, to warrant ditching my CSS books, and building with GWT layout panels?

    Read the article

  • CSS Attribute Content Selector multiple declarations

    - by Dave
    I have this in my CSS: div#headwrap ul li a[href*="dev"] {background: #034769}; div#headwrap ul li a[href*="music"] {background: #A61300}; div#headwrap ul li a[href*="opinion"] {background: #b2d81e}; div#headwrap ul li a[href*="work"] {background: #ffc340}; So, my expected behavior is that where a link (a) within a list item (li) inside a unordered list (ul) inside a div with id "headwrap" has an href that contains "dev", the link will have a background color of #034769. If the link has an href that contains "music" it will have a background color of #A61300, and so on. However, what I am seeing is that the rule is only correctly applied to "dev". If I reorder the CSS declarations (putting music first, for instance), it only gets applied to "music". I'm testing in Firefox and Chrome, both are doing the same thing. Only the first one is applied. Anyone have any ideas why?

    Read the article

  • Css editor with certain features

    - by user255408
    I need a light css editor with certain functions. Already downloaded and tried a few apps but still no luck, none of them fit my requirements. Actually, there is one, CssEdit (or TextMate), but unfortunately i'm a windows user... Already tried: built-in NetBeans IDE css editor (btw nice editor, the one i'm using now for css) IntelJ IDE (very good html and css editor, but using the entire ide just for this - that's crazy) ArduoCss (very buggy in win7 environment) Notepad Notepad++ (it rules, but as i said, i need something more functional for css editing) Style Master ( if i don't find anything else, probably i'll choose this one) Stylizer ( also might be my choice, but it's black interface kills me, also extremy noob-oriented, i even couldn't find a way to see the source code) Some of the features i am looking for: grouping by comments like here snippets autocomplete, if i type for instance f-s, it should recognize and expand it to "font-size" property color picker The editor must have at least the first feature that i listed above. Sorry for my poor english.

    Read the article

  • inherit properties and then change some on particular site (css)

    - by Radek
    I have three menus on this test web site. I am learning css and trying all the menus inherit all properties from menu class. The second one looks different and is not clickable. I am happy with the 3rd one, just want to make it horizontal and change its position bit. Could somebody tell me why the second menu is not click-able? how I can make the third menu vertical? I thought that display: block; for li of the 3rd menu would do the trick but I do not know the css path for that li.

    Read the article

  • CSS selector for the last occurrence of a class on a page

    - by snaken
    Is there a CSS selector for the last occurrence of a class on a page? Say i have this HTML <dd> <span> <a class="required" id="forename">foo</a> </span> </dd> <dd> <span> <a class="required" id="surname">bar</a> </span> </dd> Is there a CSS selector that would return the a tag with the ID of surname. Something like .required:last maybe? Will be using Prototype if that matters?

    Read the article

  • Points in CSS specificity

    - by Sam
    Researching specificity I stumbled upon this blog - http://www.htmldog.com/guides/cssadvanced/specificity/ It states that specificity is a point-scoring system for CSS. It tells us that elements are worth 1 point, classes are worth 10 points and IDs are worth 100 points. It also goes on top say that these points are totaled and the overall amount is that selector's specificity. For example: body = 1 point body .wrapper = 11 points body .wrapper #container = 111 points So, using these points surely the following CSS and HTML will result in the text being blue: CSS: #a { color: red; } .a .b .c .d .e .f .g .h .i .j .k .l .m .n .o { color: blue; } HTML: <div class="a"> <div class="b"> <div class="c"> <div class="d"> <div class="e"> <div class="f"> <div class="g"> <div class="h"> <div class="i"> <div class="j"> <div class="k"> <div class="l"> <div class="m"> <div class="n"> <div class="o" id="a"> This should be blue. </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> RESULT: http://jsfiddle.net/hkqCF/ Why is the text red when 15 classes would equal 150 points compared to 1 ID which equals 100 points?

    Read the article

  • CSS Selector not working on elements within a div

    - by stevebot
    Hi, I have the following HTML structure: <div class="formFields"> <label> Field 1: </label> <input type="text" value="" name="field1" /> </div> And my CSS selectors are as follows: #formFields {clear:both;} #formFields label {font-weight:bold;} The clear:both; is being applied to the div, but the font-weight:bold; is not being applied to the labels. How would I apply this font-weight to the labels?

    Read the article

  • CSS formatter NOT based on CSS Tidy?

    - by Abdu
    I can't find a css formatter (web based or Windows app) which formats the css where it puts the open brace on its own line aligned with its close brace, plus indents the attributes. The web based css formatters out here seem to be based on CSSTidy which doesn't do what I want. I don't like this CSSTidy format: .example { font-size: 3em; } I want: .example { font-size: 3em; }

    Read the article

  • Floats in CSS - Gap/space left on top when floated to the right?

    - by bobthabuilda
    This is a little difficult to describe, but basically there is undesired space left by a floated div on my page. Here are pictures describing the problem. The black boxes are divs. Before floating: After floating: Desired effect: And I'm not sure if it makes a difference, but I also have an empty div with "clear: both" placed immediately after the floated div. How can I achieve this?

    Read the article

  • transform:translateX vs transition on left property. Which has better performance? CSS

    - by JackMahoney
    I'm making a slide out menu with HTML and CSS3 - especially transitions. I would like to know what is best practice / best performance to slide a relatively positioned div horizontally. When i click a button it adds a class to my div. Which class is better? (Note I can add all the browser prefixes later and this site only targets modern browsers). //option 1 .animate{ -webkit-transition:all ease 0.3s; -webkit-transform:translateZ(200px); } //option 2 .animate{ -webkit-transition:all ease 0.3s; left:200px; } Thanks

    Read the article

  • CSS: Style applied to a combination of classes?

    - by Eli
    Hi All, I'm not sure this is possible, but is there a syntax to be used in CSS when you want to style an element based on the combination of classes applied to it? I understand that I can check an element with jQuery or something and change it's style based on the classes it has, but is there a pure CSS way to do this? For example, if I have a class for bold and green: .bold_green { color:green; font-weight:bold; } And a class for bold and blue: .bold_blue { color:green; font-weight:bold. } Now, say I am using jQuery to add and remove classes dynamically and want any element that has both classes to turn italic pink. Something like: .bold_green AND .bold_blue { color:pink; font-style:italic; } Or, if I want to style an element that has aclass, and is a descendant of another element that has another class? Something like: .bold_green HAS_CHILD .bold_blue { color:black; background-color:yellow; } Thanks!

    Read the article

  • CSS selector involving pseudo class first-child and dropcap

    - by Grnbeagle
    Hi, I need to format HTML similar to below. Basically a quote is optional, and I need to dropcap the first letter of the body paragraph. <article> <p class="quote"> <!-- quote is optional --> Genius begins great works; labor alone finishes them.-- Joseph Joubert </p> <p> <!-- "L" is a dropcap --> Life is like a box of chocolates. </p> <p>...</p> <p>...</p> </article> My CSS looks like this: article > p:first-child:first-letter { float: left; font-family: Georgia, serif; font-size: 360%; line-height: 0.85em; margin-right: 0.05em; } p.quote { font-weight: bold; } It doesn't work currently when the quote is introduced. AFAIK I can't select the article's first child P which is not class "quote." I'll use jQuery if I can't figure this out, but for now I'm looking for a way to do it CSS only. Thanks in advance!

    Read the article

  • CSS practices: negative positioning

    - by Corey
    I'm somewhat of a novice to CSS. Anyway, I noticed that an extremely common method used in CSS is to have negative or off-screen positioning, whether it be to hide text or preload images or what have you. Even on SE sites, like StackOverflow and this website, have #hlogo a { text-indent: -999999em } set in their CSS. So I guess I have a few questions. is this valid CSS? or is it just a "hack"? are there downsides to doing things this way? why is this so common? aren't there better ways to hide content?

    Read the article

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