Search Results

Search found 11216 results on 449 pages for 'css'.

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

  • CSS child selector (>) doesn't work with IE

    - by Eric
    The following CSS works well under firefox but doesn't work under IE browser, Why? Also, how can I make only the elements, directly under the parent element, be affected by CSS? CSS: .box{font:24px;} .box>div{font:18px} .box>div>div{font:12px;} HTML: <div class="box"> level1 <div> level2 <div> level3</div> <div> level3</div> </div> <div> level2 <div> level3</div> <div> level3</div> </div> </div>

    Read the article

  • 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

  • nginx probably deliering wrong filetype for .css file with php tags

    - by Katai
    And again - NGINX is giving me many Questions today :) Like always, I already tried around for a while, but cant seem to fix this issue: I just configured NGINX to handle my .css files equal to my .php files (to parse PHP tags inside the CSS file). This works perfectly, and the file is found and delivered. I could debug it with FIrebug, and everything is OK (it displays the contents of the .css inside the opened <link> tag). So, everything working, right? Wrong. It has the CSS, but it does not interpret it! What I mean by this: apparently, the file-type of the CSS (or aplication-type, whatever) is wrong. The Page can access the CSS, but doesnt bother at all to actually use it. What I checked / tried: There are no PHP errors inside of the .css, so that one is out The .css is accessible. I can call the URI manually, or check if the included URL finds it: both works The .css has no syntax errors (i switched to a css that just has body {background-color: #000; } It works whitout NGINX I deleted the browser cache / restarted NGINX after config rewrites Here the configuration: server { listen 80; server_name localhost; access_log /var/log/nginx/board.access_log; error_log /var/log/nginx/board.error_log warn; root /var/www/board/public; index index.php; fastcgi_index index.php; location / { try_files $uri $uri /index.php; } location ~ (\.php|\.css)$ { try_files $uri =404; include /etc/nginx/fastcgi_params; #keepalive_timeout 0; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass 127.0.0.1:7777; } } Firebug 'Network' Response Header: Connection keep-alive Content-Encoding gzip Content-Type text/html Date Sat, 16 Jun 2012 10:08:40 GMT Server nginx/1.0.5 Transfer-Encoding chunked X-Powered-By PHP/5.3.6-13ubuntu3.7 I think I just answered my own question. Is the Content-Type text/html the problem? How can I remove that? My personal guess is that I have to use this in some way include /etc/nginx/mime.types; default_type application/octet-stream; But I'm not sure... anyone an idea how to solve this? TLDR; CSS file is delivered correctly, but it doesnt seem to be 'used' as CSS from the browser. (Tested, works on apache)

    Read the article

  • css: zoooming-out inside the browser moves rightmost floated div below other divs

    - by John Sonderson
    I am seeing something strange in both firefox and chrome when I increase the zoom level inside these browsers, although I see nothing wrong with my CSS... I am hoping someone on this group will be able to help. Here is the whole story: I have a right-floated top-level div containing three right-floated right. The three inner divs have all box-model measurements in pixels which add up to the width of the enclosing container. Everything looks fine when the browser size is 100%, but when I start making the browser smaller with CTRL+scrollwheel or CTRL+minus the rightmost margin shrinks down too fast and eventually becomes zero, forcing my rightmost floated inner div to fall down below the other two! I can't make sense out of this, almost seems like some integer division is being performed incorrectly in the browser code, but alas firefox and chrome both display the same result. Here is the example (just zoom out with CTRL-minus to see what I mean): Click Here to View What I Mean on Example Site Just to narrow things down a bit, the tags of interest are the following: div#mainContent div#contentLeft div#contentCenter div#contentRight I've searched stackoverflow for an answer and found the following posts which seem related to my question but was not able to apply them to the problem I am experiencing: http:// stackoverflow.com/questions/6955313/div-moves-incorrectly-on-browser-resize http:// stackoverflow.com/questions/18246882/divs-move-when-resizing-page http:// stackoverflow.com/questions/17637231/moving-an-image-when-browser-resizes http:// stackoverflow.com/questions/5316380/how-to-stop-divs-moving-when-the-browser-is-resized I've duplicated the html and css code below for your convenience: Here is the HTML: <!doctype html> <html> <head> <meta charset="utf-8"> <title>Pinco</title> <link href="css/style.css" rel="stylesheet" type="text/css"> </head> <body> <div id="wrapper"> <header> <div class="logo"> <a href="http://pinco.com"> <img class="logo" src="images/PincoLogo5.png" alt="Pinco" /> </a> </div> <div class="titolo"> <h1>Benvenuti!</h1> <h2>Siete arrivati al sito pinco.</h2> </div> <nav> <ul class="menu"> <li><a href="#">Menù Qui</a></li> <li><a href="#">Menù Quo</a></li> <li><a href="#">Menù Qua</a></li> </ul> </nav> </header> <div id="mainContent"> <div id="contentLeft"> <section> <article> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque tempor turpis est, nec varius est pharetra scelerisque. Sed eu pellentesque purus, at cursus nisi. In bibendum tristique nunc eu mattis. Nulla pretium tincidunt ipsum, non imperdiet metus tincidunt ac. In et lobortis elit, nec lobortis purus. Cras ac viverra risus. Proin dapibus tortor justo, a vulputate ipsum lacinia sed. In hac habitasse platea dictumst. Phasellus sit amet malesuada velit. Fusce diam neque, cursus id dui ac, blandit vehicula tortor. Phasellus interdum ipsum eu leo condimentum, in dignissim erat tincidunt. Ut fermentum consectetur tellus, dignissim volutpat orci suscipit ac. Praesent scelerisque urna metus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis pulvinar, sem a sodales eleifend, odio elit blandit risus, a dapibus ligula orci non augue. Nullam vitae cursus tortor, eget malesuada lectus. Nulla facilisi. Cras pharetra nisi sit amet orci dignissim, a eleifend odio hendrerit. </p> </article> </section> </div> <div id="contentCenter"> <section> <article> <p> Maecenas vitae purus at orci euismod pretium. Nam gravida gravida bibendum. Donec nec dolor vel magna consequat laoreet in a urna. Phasellus cursus ultrices lorem ut sagittis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vivamus purus felis, ornare quis ante vel, commodo scelerisque tortor. Integer vel facilisis mauris. </p> <img src="images/auto1.jpg" width="272" height="272" /> <p> In urna purus, fringilla a urna a, ultrices convallis orci. Duis mattis sit amet leo sed luctus. Donec nec sem non nunc mattis semper quis vitae enim. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Suspendisse dictum porta quam, vel lobortis enim bibendum et. Donec iaculis tortor id metus interdum, hendrerit tincidunt orci tempor. Sed dignissim cursus mattis. </p> </article> </section> </div> <div id="contentRight"> <section> <article> <img src="images/auto2.jpg" width="272" height="272" /> <img src="images/auto3.jpg" width="272" height="272" /> <p> Cras eu quam lobortis, sodales felis ultricies, rhoncus neque. Aenean nisi eros, blandit ac lacus sit amet, vulputate sodales mi. Nunc eget purus ultricies, aliquam quam sit amet, porttitor velit. In imperdiet justo in quam tristique, eget semper nisi pellentesque. Cras fringilla eros enim, in euismod nisl imperdiet ac. Fusce tempor justo vitae faucibus luctus. </p> </article> </section> </div> </div> <footer> <div class="footerText"> <p> Copyright &copy; Pinco <br />Lorem ipsum dolor sit amet, consectetur adipiscing elit. <br />Fusce ornare turpis orci, nec egestas leo feugiat ac. <br />Morbi eget sem facilisis, laoreet erat ut, tristique odio. Proin sollicitudin quis nisi id consequat. </p> </div> <div class="footerLogo"> <img class="footerLogo" src="images/auto4.jpg" width="80" height="80" /> </div> </footer> </div> </body> </html> and here is the CSS: /* CSS Document */ * { margin: 0; border: 0; padding: 0; } body { background: #8B0000; /* darkred */; } body { margin: 0; border: 0; padding: 0; } div#wrapper { margin: 0 auto; width: 960px; height: 100%; background: #FFC0CB /* pink */; } header { position: relative; background: #005b97; height: 140px; } header div.logo { float: left; width: 360px; height: 140px; } header div.logo img.logo { width: 360px; height: 140px; } header div.titolo { float: left; padding: 12px 0 0 35px; color: black; } header div.titolo h1 { font-size: 36px; font-weight: bold; } header div.titolo h2 { font-size: 24px; font-style: italic; font-weight: bold; color: white;} header nav { position: absolute; right: 0; bottom: 0; } header ul.menu { background: black; } header ul.menu li { display: inline-block; padding: 3px 15px; font-weight: bold; } div#mainContent { float: left; width: 100%; /* width: 960px; *//* height: 860px; */ padding: 30px 0; text-align: justify; } div#mainContent img { margin: 12px 0; } div#contentLeft { height: 900px; float: left; margin-left: 12px; border: 1px solid black; padding: 15px; width: 272px; background: #ccc; } div#contentCenter { height: 900px; float: left; margin-left: 12px; border: 1px solid transparent; padding: 15px; width: 272px; background: #E00; } div#contentRight { height: 900px; float: left; margin-left: 12px; border: 1px solid black; padding: 15px; width: 272px; background: #ccc; } footer { clear: both; padding: 12px; background: #306; color: white; height: 80px; font-style: italic; font-weight: bold; } footer div.footerText { float: left; } footer div.footerLogo { float: right; } a { color: white; text-decoration: none; } Thanks.

    Read the article

  • Are CSS sprites bad for SEO?

    - by UpTheCreek
    Nowadays often what was accomplished with an <img> tag is now done with something like a <div> with a Css background image set using a CSS 'sprite' and an offset. I was wondering what kind of an effect his has on SEO, as effectively we lose the alt attribute (which is indexed by google), and are stuck with the 'title' attribute (which as far as I understand is not indexed). Is this a significant dissadvantage?

    Read the article

  • Difference in css-positioning in windows and linux

    - by andrii
    I have a problem with rendering my html page by the same browsers in different OS. There are 3 spans and position of each span is corrected through css(position:relative). But I have found out that the page that looks correct in firefox under Linux, shows not right at the same firefox(3.5.7) under Windows OS. Linux(Left - How it should be)/Windows(right): link text And the same with other browsers. What is the cause of this problem and how is possible to solve it. My code: question.html: <!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> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>Question</title> <link href="css/question.css" rel="stylesheet" media="all" /> </head> <body> <div class="eventFullDate"> <span class="eventYear">2010</span> <span class="eventDate">17</span> <span class="eventMonth">FEB</span> </div> </body> </html> question.css: html, body{ font-family: Georgia; } div.eventFullDate{ height: 39px; width: 31px; float: left; border: 1px solid; border-color: #E3E3E3; background-color: #F7FFFF; } span.eventYear, span.eventDate, span.eventMonth{ color: #EC5C1D; position: relative; width: 100%; } span.eventYear{ left: 1px; bottom: 3px; font-size: 0.8em; } span.eventDate{ left: 5px; bottom: 12px; font-size: 1.3em; } span.eventMonth{ left: 3px; bottom: 15px; font-size: 0.8em; }

    Read the article

  • CSS Framework Recommendations

    - by Jourkey
    When I say CSS Framework, I don't mean a reset or a grid. I mean a framework like xCSS or csscaffold or compass. I've been doing CSS for a couple of years, but has not had a lot of exposure to frameworks. Does anyone have any experiences working with them? What are some potential downsides? What frameworks are popular/recommended? Thanks.

    Read the article

  • CSS: Aligning problem with rounded corners in IE 6/7 but ok in IE8/ Firefox etc

    - by mark smith
    Hi there, can anyone help? I have a problem aligning rounded corners in IE6/7. Basically everything seems to work in Firefox / IE8 but in IE6/7 the left / center / and right divs get misaligned. This basically shows exactly what i am refering to. here is the example in IE8 and everything works ok http://es.drop.io/ern0fye/asset/ie8-jpg And here is the problem (this example is running in IE8 with compat mode set to IE7) http://es.drop.io/ern0fye/asset/ie7-jpg I seem to remember there being a bug in IE6/7 with lineheight or similar but i don't recall exactly. I will paste the CSS and HTML below it is very very simple. Basically there is a left div that holds the left corner image and center div which has a background of RED which is the same as the corner images and finally a right div which holds the right corner image. I would appreciate any input anyone has. Thanks in advance. Here is the CSS .vl-top-left { float:left; width:12px; height:12px; } .vl-top-center { float:left; width: 485px; background-color: #F04A23; height:12px; } .vl-top-right { float:left; height:12px; width:12px; } and the HTML is :- <!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> <title></title> <link href="Stylesheet1.css" rel="stylesheet" type="text/css" /> </head> <body> <div class="vl-top-left"> <img src="content/images/esquina_sup_izq.gif" width="12" height="12"> </div> <div class="vl-top-center"> &nbsp; </div> <div class="vl-top-right"> <img src="content/images/esquina_sup_der.gif" width="12" height="12"> </div> </body> </html> EDIT Applied also margin:0 and padding:0 on the body and on each DIV but still the left and right div drops down as per the screenshot

    Read the article

  • Full page border | CSS

    - by Wayne
    Isn't there a CSS way of having the page to get a border around the page, even if the content was not big enough for the page to scroll and there's still a border around the page. I think I remember I saw one CSS method before was like something something, I don't know, do you know? lol If you know, many thanks :)

    Read the article

  • Visual Studio search feature does not seem to be searching for text in CSS files [migrated]

    - by aspdotnetuser
    I noticed that when using Visual Studio's 'Find in files' search feature, it does not appear to search/find text in CSS files even though the text does exist. I can't find anything on the net regarding this issue and cannot determine even if Visual Studio allows you to search for text within CSS files. Hopefully someone can shed some light on this; Is it supposed to allow you to do this? If so, what reasons would explain why this is not working?

    Read the article

  • CSS and Page Size and Horizontal Scrollbar

    - by Steve
    When I added some CSS stuff to my page, the page got wider and and horizontal appeared even the content is very minimal and does not require to scroll. How can I remove it. I used the following to remove it but it appears as a hack and I am just playing around with CSS, so is there a proper way to do this

    Read the article

  • Automatic CSS Preview Generator - Have css file, want to automatically generate html to preview styl

    - by Marcel Chastain
    I have a fairly large CSS file developed by my web designer. There are, of course, plenty of IDs, classes and tag properties assigned therein. Are there any tools to automatically generate HTML based on a CSS source file? For example: #basicInfoHead{ background:url(../images/leftHeaders.jpg) no-repeat; margin-left: 0px; width:185px; height:28px; } #basicInfoHead span{ float: left; } Would generate <div id=basicInfoHead><span>#basicInfoHead span</span></div> Etc etc. From there, I could preview the generated code in my browser, and see what each of the individual (primarily text) styles would look like. Thanks in advance!

    Read the article

  • How to reset parent child relationship between nested div

    - by Shantanu Gupta
    I am new to CSS designing and not aware of most of the properties of CSS. I am creating a layout for a web page. I am using div in my layout. My structure is somewhat like this <div id="content1_bg"> <div> <div class="content1_title_img_div"></div> <div class="content1_title_txt_div"></div> <div class="content1_dvider_div"></div> <div class="content1_content_div"></div> </div> <div></div> <div></div> </div> For this my CSS is #content1_bg div{width:250px;height:220px;float:left;border:3px solid blue; margin:20px;} .content1_title_img_div{width:50px;height:100px;} .content1_title_txt_div{width:150px;height:100px;} .content1_dvider_div{width:100%;height:10%;clear:both;} .content1_content_div{width:100%;height:50%;clear:both;} For this layout i was expecting my design to be like ---------------- |BOX1 BOX2 | ---------------- | BOX 3 | ---------------- | BOX 4 | ---------------- But on using my css layout is somewhat like this -------------------- | | | | | |BOX1| | BOX2| | | | | | | -------------------- | | |BOX3| | | -------------------- | | |BOX4| | | Basically i want my inner div's not to inherit the properties of outer div. How can i remove this inheritance relationship between parent div and child div

    Read the article

  • Right-Align and Vertical Align label with checkbox/radio button CSS

    - by Jon
    Hi Everyone, I'm very close and have this working in Safari, Firefox and IE8, however IE7 the labels and radio buttons do not align vertically. My HTML is: <div id="master-container"> <fieldset id="test"> <legend>This is a test of my CSS</legend> <ul class="inputlist"> <li> <label for="test1">Test 1</label> <input name="test1" id="test1" type="checkbox" disabled="disabled"/> </li> <li> <label for="test2">Test 2</label> <input name="test2" id="test2" type="checkbox" disabled="disabled"/> </li> </ul> </fieldset> </div> My CSS Is: html{font-family:Arial,Helvetica,sans-serif;} #master-container{width:615px;font-size:12px;} ul.inputlist{list-style-type:none;} ul.inputlist li{width:100%;margin-bottom:5px;} ul.inputlist li label{width:30px; text-align:right; margin-right:7px;float:left;} Any suggestions? Thanks! EDIT: Based on the suggestion to check the rest of my html and css. I updated the code above and now it accurately demonstrates the problem. If I take font-size out of #master-container it lines up but then it is not the proper font-size. I tried to add a font-size to ul.inputlist li input but that didn't help. Any suggestions? Thanks for your help everyone!

    Read the article

  • Absolutely positioned element inside fixed positioned element

    - by Salman A
    Related to my previous question, I have a <div style="position: fixed;"> footer. The footer contains <a style="display: block; float: left;"> elements. Upon clicking one of these links I want a div to popup above that link. I am experimenting with a couple of CSS settings and got acceptable results but I am not sure if my CSS will work across browsers. I am wondering if some one can tell me a bullet proof and tested CSS solution to achieve something like this:

    Read the article

  • Weird CSS-behaviour [migrated]

    - by WMRKameleon
    <!DOCTYPE html> <html> <head> <title>PakHet</title> <link rel="stylesheet" type="text/css" href="css/basis.css" /> </head> <body> <div class="wrapper"> <div id='cssmenu'> <ul> <li class="active"><a href='index.html'><span>Start</span></a></li> <li><a href='pakhet.html'><span>Over PakHet</span></a></li> <li><a href='overons.html'><span>Over Ons</span></a></li> <li class='has-sub '><a href='#'><span>Uw pakket</span></a> <ul> <li><a href='aanmelden.php'><span>Aanmelden</span></a></li> <li><a href='traceren.php'><span>Traceren</span></a></li> </ul> </li> </ul> </div> <div class="header"> <h1>Hier komt de titel van de website</h1> </div> <div class="content"> <p>Dit is de tekst van de content. Dit is de indexpagina.</p> </div> </div> </body> </html> And this is the CSS: /* CSS RESET */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video, *{ margin: 0; padding: 0; border: 0; vertical-align: baseline; } table { border-collapse: collapse; border-spacing: 0; } /* Einde CSS RESET, nu echte code */ html, body{ background:url(../images/bg_picture.jpg) fixed no-repeat; } .wrapper{ margin:0 auto; } .header{ margin:0 auto; background-color:rgba(0, 0, 0, 0.4); } .content{ background-color:rgba(0, 0, 0, 0.4); width:600px; margin:0 auto; margin-top:50px; } .content p{ color:white; text-shadow:1px 1px 0 rgba(0,0,0, 0.5); font-family:"Lucida Grande", sans-serif; } #cssmenu{ height:37px; display:block; padding:0; margin: 0; border:1px solid; } #cssmenu > ul {list-style:inside none; padding:0; margin:0;} #cssmenu > ul > li {list-style:inside none; padding:0; margin:0; float:left; display:block; position:relative;} #cssmenu > ul > li > a{ outline:none; display:block; position:relative; padding:12px 20px; font:bold 13px/100% "Lucida Grande", Helvetica, sans-serif; text-align:center; text-decoration:none; text-shadow:1px 1px 0 rgba(0,0,0, 0.4); } #cssmenu > ul > li:first-child > a{border-radius:5px 0 0 5px;} #cssmenu > ul > li > a:after{ content:''; position:absolute; border-right:1px solid; top:-1px; bottom:-1px; right:-2px; z-index:99; } #cssmenu ul li.has-sub:hover > a:after{top:0; bottom:0;} #cssmenu > ul > li.has-sub > a:before{ content:''; position:absolute; top:18px; right:6px; border:5px solid transparent; border-top:5px solid #fff; } #cssmenu > ul > li.has-sub:hover > a:before{top:19px;} #cssmenu ul li.has-sub:hover > a{ background:#3f3f3f; border-color:#3f3f3f; padding-bottom:13px; padding-top:13px; top:-1px; z-index:999; } #cssmenu ul li.has-sub:hover > ul, #cssmenu ul li.has-sub:hover > div{display:block;} #cssmenu ul li.has-sub > a:hover{background:#3f3f3f; border-color:#3f3f3f;} #cssmenu ul li > ul, #cssmenu ul li > div{ display:none; width:auto; position:absolute; top:38px; padding:10px 0; background:#3f3f3f; border-radius:0 0 5px 5px; z-index:999; } #cssmenu ul li > ul{width:200px;} #cssmenu ul li > ul li{display:block; list-style:inside none; padding:0; margin:0; position:relative;} #cssmenu ul li > ul li a{ outline:none; display:block; position:relative; margin:0; padding:8px 20px; font:10pt "Lucida Grande", Helvetica, sans-serif; color:#fff; text-decoration:none; text-shadow:1px 1px 0 rgba(0,0,0, 0.5); } #cssmenu, #cssmenu > ul > li > ul > li a:hover{ background:#333333; background:-moz-linear-gradient(top, #333333 0%, #222222 100%); background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,#333333), color-stop(100%,#222222)); background:-webkit-linear-gradient(top, #333333 0%,#222222 100%); background:-o-linear-gradient(top, #333333 0%,#222222 100%); background:-ms-linear-gradient(top, #333333 0%,#222222 100%); background:linear-gradient(top, #333333 0%,#222222 100%); filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#333333', endColorstr='#222222',GradientType=0 ); } #cssmenu{border-color:#000;} #cssmenu > ul > li > a{border-right:1px solid #000; color:#fff;} #cssmenu > ul > li > a:after{border-color:#444;} #cssmenu > ul > li > a:hover{background:#111;} #cssmenu > ul > li.active > a{ color:orange; } .header{ clear:both; } The problem is that, whenever I hover on the dropdown-menu, that a 1px margin appears in between the menu and the header. Can I solve that? I can't seem to find the solution.

    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

  • Fixed JavaScript Warning - Pin to Top of Page Using CSS Position [migrated]

    - by nicorellius
    I am new to this site, but it seems like the right place to ask this question. I am working on a noscript chunk of code whereby I do some stuff that includes a <p> at the top of the page that alerts the users that he/she has JavaScript disabled. The end result should look like the Stack Exchange sites when JavaScript is disabled (here is a screenshot of mine - SE looks similar except it is at the very top of the page): I have it working OK, but I would love it if the red bar stayed fixed along the top, upon scrolling. I tried using the position: fixed; method, but it ends up moving the p element and I can't get it to look exactly the same as it does without the position: fixed; modification. I tried fiddling with CSS top and left and other positioning but it doesn't ever look like I want it to. Here is a CSS snippett: <noscript> <style type="text/css"> p. noscript_warning { position: fixed; } </noscript>

    Read the article

  • CSS help positioning divs inline

    - by JaPerk14
    I need help with a recurring problem that happens a lot. I want to create a header that consists of 3 sections which are positioned inline. I display them inline using the following css code: display: inline & float: leftThe problem is that when I resize my browser window the last div is pushed down and isn't displayed inline. I know it sounds like I'm being picky, but I don't want the design to distort as the visitor change's the monitor screen. I have provided the html and css code below that I am working with below. Hopefully I have explained this well enough. Thanks in advance. HTML <div class="masthead-wrapper"> &nbsp; </div> <div class="searchbar-wrapper"> &nbsp; </div> <div class="profile-menu-wrapper"> &nbsp; </div> CSS #Header { display: block; width: 100%; height: 80px; background: #C0C0C0; } .masthead-wrapper { display: inline; float: left; width: 200px; height: 80px; background: #3b5998; } .searchbar-wrapper { display: inline; float: left; width: 560px; height: 80px; background: #FF0000; } .profile-menu-wrapper { display: inline; float: left; width: 200px; height: 80px; background: #00FF00; }

    Read the article

  • CSS Equivalent of Table Rowspan with Fluid Height

    - by Gabe
    I'm trying to accomplish the following using CSS: <table border="1" width="300px"> <tr> <td rowspan="2">This row should equal the height (no fixed-height allowed) of the 2 rows sitting to the right.</td> <td>Here is some sample text. And some additional sample text.</td> </tr> <tr> <td>Here is some sample text. And some additional sample text.</td> </tr> </table> The examples I've seen for accomplishing this utilize fixed heights or allow the content to wrap around the left column. Is there an elegant way to accomplish this using CSS?

    Read the article

  • CSS/HTML: How to simulate IFRAME with CSS?

    - by BBnight
    I want to have a header DIV and a footer DIV always displayed on my web page, regardless of when you scroll down the page. How do I accomplish this using only CSS (without IFRAMES) For example: <div id=header>Always display on top, regardless if you have scrolled down the page</div> <div id=main_content>...</div> <div id=footer>Always display on the bottom</div>

    Read the article

  • CSS - margin and float property

    - by David Casillas
    1.- We have a div with static positioning. Inside we have a parragraph with a margin. The heigth of the div will be the parragraph without the margin 2.- We have a div with float:left. Inside we have a parragraph with a margin. The heigth of the div will be the parragraph plus its margin. What is the explanation of this? Here is the html code and the CSS code. And here is a link to the test site. http://prueba.davidcasillas.es/ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Untitled Document</title> <link href="index.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="nivel1"> <div id="nivel21"> <p>Este es el primer parrafo</p> </div> <div id="nivel22"> <p>Este es el primer parrafo</p> </div> </div> </body> </html> body { margin:0; padding:0; } #nivel1 { border:solid; border-color:#333; margin:0; background-color:#0F3; margin:2em; } #nivel21 { margin:2em; float:left; background-color:#C00; } #nivel22 { margin:2em; background-color:#FC0; }

    Read the article

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