CSS - Background Style Not Applying
Sidebar div's background is messed up. Its background should be black until the end, but its cut short.
Check it he http://www.refinethetaste.com/html/default.asp?Section=products&CATEGORYID=4 PHP Code: #products .sidebar { background: #000000; color: #CCCCCC; padding: 10px 0 0 0; } #products .sidebar ul { margin: 0; padding: 0; list-style: none;} #products .sidebar li { display: block; float: left; width: 124px; padding: 10px 5px 10px 15px;} #products .sidebar li ul { line-height: 15px; } #products .sidebar li li { display: list-item; background: url(../images/img07.gif) no-repeat left 50%; padding: 0 0 0 10px;} #products .sidebar h2 { font-size: 12px; margin: 0px; color: #FFFFFF;} #products .sidebar a { font-size: 10px; text-decoration: none; color: #CCCCCC;} #products .sidebar a:hover { text-decoration: underline;} #products .clear { clear:both; height:1px; width:1px; overflow:hidden; } PHP Code: <div class="clear"></div> <div class="sidebar"> <ul> <li> <h2>Lorem Ipsum</h2> <ul> <li><a href="#">Fusce dui neque fringilla</a></li> <li><a href="#">Eget tempor eget nonummy</a></li> <li><a href="#">Magna lacus bibendum mauris</a></li> <li><a href="#">Nec metus sed donec</a></li> <li><a href="#">Magna lacus bibendum mauris</a></li> </ul> </li> <li> <h2>Recipient</h2> <ul> <li><a href="#">Family</a></li> <li><a href="#">For Him</a></li> <li><a href="#">For Her</a></li> </ul> </li> <li> <h2>Price</h2> <ul> <li><a href="#">Under $50</a></li> <li><a href="#">$50-$75</a></li> <li><a href="#">$75-$150</a></li> <li><a href="#">$150 & Up</a></li> </ul> </li> </ul> </div> <div class="clear"></div> Similar TutorialsPlease can anyone tell me why my style sheet is not applying to this page http://www.on-line-biz.com ? hey guys i have this so far
Code: div#navbar2 { height: 30px; width: 100%; border-top: solid #000 1px; border-bottom: solid #000 1px; background-color: #99b3b4; text-align:center; } div#navbar2 ul { margin: 0px; padding: 0px; font-family: Arial, Helvetica, sans-serif; font-size: small; color: #FFF; line-height: 30px; white-space: nowrap; } div#navbar2 li { list-style-type: none; display: inline; } div#navbar2 li a { text-decoration: none; padding: 7px 10px; color: #FFF; } div#navbar2 li a:link { color: #FFF: } div#navbar2 li a:hover { font-weight: bold; color: #000000; background-color: #e4ebeb; } but what i can figure out is how to show the link they are on as a selected button so having the button be red if they are on that link... Code: <div id="navbar2"> <ul> <li><a href="index.php?page=update">Basic</a></li> <li><a href="link2.html%20">Button 2</a></li> <li><a href="link3.html%20">Button 3</a></li> </ul> </div> I would like to create an effect similar to the one found on http://www.macromedia.com that when you click in the search box, the edge of the searchbox changes color. I know how to change the color of the box, but I do not know how to make the box switch whenever it is clicked on or in focus. Can anyone help me? Hello All, following is my code Code: <html> <head> <style type="text/css"> .test { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #ff0000; font-weight: bold; } </style> </head> <select name="slt" > <option class="test">value1</option> <option>value2</option> <option>value3</option> </select> </html> In the above code i am trying to apply style for first option i got the color for first option but not the size and weight. The font-size and font-weight attributes are not applied.... can some one help me out in this... Please help me ASAP Thanks in Advance Ramesh I was reading that if you wanted to apply the same style to more than one rule, you can use a comma, but I'm having a weird quirk happen when I do that. for example: h1, h2 {color:olive;} For some reason, it's only applying to h2. Even when I place it so that there are no parent elements. I've validated the xhtml and the css. What's the deal? I'm a total newbie to CSS and web design in general. Sorry if I'm using the wrong terms for things. take a look at www.bosszine.be, looks fine isn't it sidebar no problems at all both in IE and FF now take a look at http://www.syntra-ab.be/template.aspx, again no problem both in IE and FF but is that so? try to capture the sidebar images from IE it won't work don't take notice at the flash infobox, that's a work in a progress furthermore take a look at http://www.syntra-ab.be/helpdesk/ and notice there's suddenly a big problem in IE (much smaller boxes on the sidebar) there's clearly a rendering problem in IE with my background images in the css how can I make this work properly? any suggestions? I need a solution urgently, the new website is due this thursday and I already spent the whole day trying to find the problem and now I've found it to fix it :-) any suggestions are greatly appreciated This is the style sheet, how can i had a background image... the page can be viewed at inkheaddesigns.com/main Code: <?php header('Content-type: text/css'); header("Cache-Control: must-revalidate"); $pattern = '/^[^a-z0-9]{6}$/'; if (preg_replace('/[^a-z0-9]/i', '', $_GET['style']) && isset($_GET['style'])) { $color = $_GET["style"]; } else { $color = "9d60c1"; } ?> /* Theme Name: WP-Creativix Theme URI: http://www.wp-themix.org/themes/wp-creativix-free-premium-portfolio-wordpress-theme/ Description: WP-Creativix is a beautifull business & portfolio Wordpress Theme. It has unlimited variations due to the possibility to define a custom color code as highlight color. It comes with a Portfolio Template already included which may display your latest work with nice Lightbox support. On the Frontpage it has a nice working Javascript Slideshow. This Theme comes with a Javascript 3-Level Dropdown Menu. Of course there are many more features such as Custom Logo Uploader and a Big Options set! Have fun while discovering. (Please use my theme DEMO to see how the Theme looks). Version: 1.5.2 Author: Dennis Nissle Author URI: http://www.wp-themix.org/ Tags: white, silver, purple, light, three-columns, two-columns, fixed-width, right-sidebar, left-sidebar, theme-options, purple, front-page-post-form, photoblogging, custom-colors, custom-header, sticky-post, microformats */ /* General Styles */ 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, font, 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 { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; } body { line-height: 1; } ol, ul { list-style: none; } blockquote, q { quotes: none; } blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; } :focus { outline: 0; } ins { text-decoration: none; } del { text-decoration: line-through; } table { border-collapse: collapse; border-spacing: 0; } a { color: #<?php echo $color;?>; text-decoration: none; } a:hover { color: #<?php echo $color;?>; text-decoration: underline; } a:visited { color: #<?php echo $color;?>; text-decoration: none; } body { font-size: 12px; font-family: Tahoma, Geneva, sans-serif; line-height:18px; } blockquote { color: #CCC; font-size: 11px; font-style: italic; } h1, h2, h3 { color: 9d60c1; } address, caption, cite, code, dfn, em, strong, th, var { font-style: normal; font-weight: normal; } table { border-collapse: collapse; border-spacing: 0; } fieldset, img { border: 0; } caption, th { text-align: left; } q:before, q:after { content: ''; } abbr { border:0; } #wrapper { width:925px; margin:0 auto; } #topmenu { margin-top: 5px; float: right; clear: both; } #header { float: left; width: 925px; height: 180px; } #logo { float: left; width: 230px; } #logo a { font-family: Helvetica; font-size: 24px; text-transform: lowercase; padding-bottom: 18px; } #logo a, img { border: none; } #logoname { float: left; width: 250px; margin-top: 145px; } #logoname a { font-family: Helvetica; font-size: 24px; text-transform: lowercase; padding-bottom: 18px; } #logoname a, img { border: none; } /* Navigation Styles */ .navigation { background: url(images/navbar.jpg) no-repeat; padding-right:18px; font-size:12px; position: relative; z-index: 6; width: 689px; height: 48px; margin-left: 245px; margin-top: 130px; } #search { width: 200px; float: right; height: 28px; } #search form { width: 200px; height: 28px; } #searchbox { background: url(images/search.gif) no-repeat top; width: 144px; height: 28px; border: none; margin-top: 10px; padding: 5px 3px 0px 15px; color: #6e6e6e; } #searchbutton { background: url(images/search_btn.gif) no-repeat; width: 27px; height: 28px; border: none; position: relative; top: -4px; left: -12px; cursor: pointer; } #header #navbar { float:left; height:50px; line-height:50px; padding-left:13px; } #navbar, #navbar ul { margin:0; padding:0; list-style-type:none; position:relative; line-height:50px; z-index:5; } #header #navbar a { height:48px; display:block; padding:0 21px; text-decoration:none; text-align:center; line-height:28px; outline:none; float: left; z-index:35; position:relative; color: #6e6e6e; } #header #navbar a:hover { color: #<?php echo $color;?>; } #header #navbar ul a { line-height: 35px; } #header #navbar li { float:left; position:relative; z-index:20; margin-top:10px; } #header #navbar li li { border-left:none; margin-top:0; } #header #navbar ul { position:absolute; display:none; width:172px; top:36px; left:-1px; background: #f5f5f5; } #header #navbar li ul a { width:130px; height:auto; float:left; text-align:left; padding:0 21px; } #header #navbar ul ul { top:auto; } #header #navbar li ul ul { left:172px; top: 0px; } #header #navbar li ul ul a { border-left:none; } #header #navbar a{ color:#888; } #header #navbar ul { border:1px solid #c0c0c0; border-top:none; } #header #navbar li ul a { border-bottom:1px solid #fff; border-top:1px solid #c0c0c0; } #header #navbar ul a, #header #navbar ul li { background-color:#f5f5f5; } #header #navbar ul a:hover, #header #navbar ul a:focus { color: #<?php echo $color;?>; } #header #navbar .current_page_item a { } #header #navbar li:hover ul ul, #header #navbar li:hover ul ul ul,#header #navbar li:hover ul ul ul ul { display:none; } #header #navbar li:hover ul, #header #navbar li li:hover ul, #header #navbar li li li:hover ul, #header #navbar li li li li:hover ul { display:block; } /* Slideshow Styles */ #slide-wrapper { background: url(images/slider-bg.gif) no-repeat; width: 921px; height: 365px; margin-top: 10px; padding-top:5px; z-index:1; margin-left: 10px; clear: both; float: left; } .featurebox { width: 921px; height: 365px; clear:both; margin:auto; } #image-wrapper { margin:0 auto; display:none; padding:0; width: 921px; } #image-wrapper * { margin:0; padding:0; } #full-image { position:relative; padding:0; width: 860px; } .frontslide { display: none; } #text { float:right; position:absolute; top:10px; width:400px; height:0; color:#6e6e6e; overflow:hidden; z-index:4; padding:0px; left: 490px; } #text h3 a { padding:3px 0 10px 3px; color: #<?php echo $color;?>; font-size: 18px; font-weight:bold; letter-spacing:-1px; text-decoration: none; } #text h3 a:hover { text-decoration: underline; } #text p { padding:0 0 5px 3px; color:#6e6e6e; float:right; font-size:12px; text-align: justify; margin: 0px; } #text p a { color:#993399; } .date { color:#9d9c9c; font-size: 10px; font-style: italic; } #image { width:440px; height:250px; } #image img { position:absolute; z-index:2; width:440px; height:200px; left:20px; top:10px; border:2px solid #bfbfbf; } .imgnav { position:absolute; width:25%; height:180px; cursor:pointer; z-index:3; } #imgprev {left:0;background:none;} #imgnext {right:0;background:none;} #imglink { position:absolute; height:150px; width:100%; z-index:5; opacity:.4; filter:alpha(opacity=40); } .linkhover { } #thumbnails {margin-top:20px;height:38px;} #arrowleft { float:left; width:26px; height:49px; background:url(images/left.gif) top center no-repeat; padding-left:40px; margin-top: 30px; z-index:6; } #slideleft:hover {} #arrowright { float:right; width:26px; height:49px; background:url(images/right.gif) top center no-repeat; padding-right:40px; margin-top: 30px; z-index:7; } #slideright:hover { } #frontarea { float:left; position:relative; width:785px; margin-left:3px; height:100px; overflow:hidden; } html* #frontarea {margin-left:0;} #fronter { position:absolute; left:0; height:100px; top: 10px; } #fronter img { cursor:pointer; border:2px solid #<?php echo $color;?>; } /* Frontpage Column Styles */ #big-column { width: 925px; margin: 0px auto; } #column-top { background: url(images/top-column.gif) no-repeat; width: 925px; height: 9px; float: left; margin-left: 7px; } #column-content { background: url(images/center-column.gif) repeat-y; width: 925px; float: left; padding-bottom: 20px; margin-left: 7px; } /* Featured Posts & Articles on Frontpage */ .feat-post { width: 300px; padding: 10px 10px 10px 20px; float: left; } .feat-post h2 { font-size: 18px; text-decoration: none; color: #6e6e6e; } .feat-post h2 a { text-decoration: none; color: #6e6e6e; } .feat-post h2 a:hover { text-decoration: none; color: #<?php echo $color;?>; } .desc h3 { font-size: 10px; font-style: italic; color: #<?php echo $color;?>; font-weight: normal; clear:both; border-bottom: 1px solid #b1b1b1; } .feat-post p { text-align: justify; color: #6e6e6e; margin-top: 15px; } .feat-post img { margin-top: 20px; border: 1px solid #<?php echo $color;?>; } .latest-posts { width: 220px; padding: 10px 10px 10px 20px; float: left; } .latest-posts h2 { font-size: 18px; text-decoration: none; color: #6e6e6e; } .latest-posts h2 a { text-decoration: none; color: #6e6e6e; } .latest-posts ul { color: #<?php echo $color;?>; margin-top: 10px; list-style-type: disc; } .latest-posts ul li { color: #<?php echo $color;?>; padding-left: 10px; margin-bottom: 5px; } .latest-posts ul li a { text-decoration: none; display: block; line-height: 15px; color: #<?php echo $color;?>; } .latest-posts ul li a:hover { text-decoration: underline; color: #<?php echo $color;?>; } .latest-posts p { text-align: justify; color: #6e6e6e; margin-top: 10px; } /* Subpage Column Styles */ #sub-column { width: 925px; height: auto; margin: 0px auto; } #sub-top { background: url(images/sub-top.gif) no-repeat; width: 925px; height: 42px; margin-left: 7px; float: left; margin-top: 10px; } #sub-content { background: url(images/sub-content.gif) repeat-y; width: 925px; float: left; margin-left: 7px; } /* Subpage Content Styles */ .content { width: 620px; float: left; padding: 10px 15px 10px 15px; } .content h1 { font-size: 24px; color: #8a8a8a; margin: 20px 0px 20px 0px; font-weight: normal; } .content p { text-align: justify; color: #8a8a8a; } .post ul { border-top: 1px solid #CCC; list-style-type: disc; list-style-position:inside; color: #6e6e6e; margin: 20px 40px 10px 10px; } .post ul li { color: #6e6e6e; border-bottom: 1px solid #CCC; padding: 5px; } .post ul li a { color: #<?php echo $color;?>; } .post ol { border-top: 1px solid #CCC; list-style-type: disc; list-style-position:inside; color: #6e6e6e; margin: 20px 40px 10px 10px; } .post ol li { color: #6e6e6e; border-bottom: 1px solid #CCC; padding: 5px; } .post ol li a { color: #<?php echo $color;?>; } /* Breadcrumb Navigation Styles */ .breadcrumb { float: left; padding: 13px 15px 10px 15px; color: #8a8a8a; font-size: 12px; } .breadcrumb a { color: #<?php echo $color;?>; font-weight: normal; text-decoration: none; } .breadcrumb a:hover { text-decoration: underline; } /* Sidebar Styles */ .sidebar { width: 220px; float: left; margin-left: 30px; margin-top: 0px; padding-bottom: 50px; } .widgettitle { color: #8a8a8a; font-size: 18px; font-weight: normal; padding: 20px 0px 10px 0px; list-style-type: none; } #sidebar ul li { list-style-type: none; } #sidebar ul ul li a { padding-left: 30px; } #sidebar ul ul ul li a { padding-left: 40px; } .textwidget { margin: 10px 8px 20px 0px; color: #6e6e6e; } .sidebar ul li a { color: #<?php echo $color;?>; text-decoration: none; border-bottom: 1px solid #CCC; display: block; padding: 5px; padding-left: 20px; background: url(images/listenpunkt.gif) no-repeat left center; } .sidebar ul li a:hover { color: #<?php echo $color;?>; text-decoration: underline; } .posted { color:#9d9c9c; font-size: 10px; font-style: italic; display: block; padding-left: 10px; } #wp-calendar { border:1px solid #cccccc; color:#6e6e6e; width: 220px; } #wp-calendar caption { color: #8a8a8a; font-size: 18px; font-weight: normal; padding: 0px 0px 10px 0px; list-style-type: none; } tbody .pad { background-color:#dddddd; } #wp-calendar a { font-weight:bold; font-size:12px; background: none; padding: 0px; margin: 0px; border: none; } thead tr th { width:20px; height:20px; text-align:center; background-color: #<?php echo $color;?>; color: #FFF; border:1px solid #cccccc; padding: 3px; } tbody tr td { width:20px; height:20px; text-align:center; border:1px solid #cccccc; } tfoot #prev { width:58px; height:20px; text-align:left; background-color:#ffffff; background: none; padding-left: 10px; } tfoot #next { width:58px; height:20px; text-align:right; background-color:#ffffff; background: none; padding-right: 10px; } /* Comment Styles */ .alt {margin: 0;padding: 10px;} #comment-wrap { border: 0px; color: #6e6e6e; font-size: 11px; } #comment-wrap h6 { font-size: 12px; margin-bottom: 10px; } #comments ol { list-style-type: none; line-height: 18px; border: 0px; } #comments ul li { list-style-type: none; list-style-image: none; list-style-position: outside; border: 0px; } .commentlist { padding: 0; text-align: justify; border: none; } .comment-body { margin-bottom: 20px; } .reply { font-size:11px; clear: both; float: right; margin-top: -20px; } .commentlist em { font-size: 11px; } .commentlist li { margin: 5px 0 0px 10px; padding: 5px 5px 0px 5px; list-style: none; border: 0px; } .commentlist li ul li { margin-right: -5px; margin-left: 30px; margin-bottom: 0px; list-style: none; border: 0px; } .commentlist li li { background:none; border:none; list-style:none; margin:3px 0 3px 20px; padding:3px 0; border: 0px; } .commentlist li .avatar { border:1px solid #ccc; margin:5px 8px 6px 5px; float: left; padding:2px; width:45px; height:45px; } .commentlist cite, .commentlist cite a { font-style: normal; font-size: 11px; margin-top: 2px; } .commentlist p { font-weight: normal; line-height: 1.5em; text-transform: none; margin: 10px 5px 5px 65px; font-size: 11px; border: none; } #commentform p { } .commentmetadata { font-weight: normal; margin: 0; display: block; font-size: 10px; font-style: italic; } .commentmetadata a, .commentmetadata a:visited { color: #6e6e6e; } .commentmetadata a:hover{ } .children { padding: 0; border: none; } .thread-alt { border: none; } .thread-even li { } .depth-1 { border: none; } .even, .alt li { margin-bottom: 20px; } #respond input { margin-right: 10px; font-size: 11px; color: #8a8a8a; display: block; margin-bottom: 5px; } #respond h4 { font-size: 12px; margin-bottom: 5px; } #submit { background-color: #8a8a8a; border: 1px solid #CCC; color: #FFF !important; padding: 3px 5px 3px 5px; margin-top: 10px; text-decoration: none; font-size: 12px; cursor: pointer; } #submit:hover { background-color: #FFF; border: 1px solid #8a8a8a; color: #8a8a8a !important; padding: 3px 5px 3px 5px; text-decoration: none; } /* Portfolio Styles */ #portfolio { margin: 20px 10px 50px 30px; float: left; } .port-pic { width: 270px; height: auto; background-color: #FFF; border: 1px solid #CCC; float: left; margin-bottom: 20px; margin-right: 20px; display: block; } .port-pic h3 { font-size: 16px; font-weight: normal; color: #<?php echo $color;?>; margin: 10px 10px 0px 12px; } .port-pic h3 a { text-decoration: none; color: #<?php echo $color;?>; } .port-pic h3 a:hover { text-decoration: underline; color: #<?php echo $color;?>; } .port-pic p { text-align: justify; color: #8a8a8a; padding: 5px 10px 10px 10px; font-style: italic; font-size: 11px; } .port-pic img { border: 2px solid #CCC; margin: 10px 10px 0px 7px; text-align: center; } /* Blog Styles */ .post { padding-bottom: 20px; margin-bottom: 30px; border-bottom: 1px solid #CCC; } .post h1 a { color: #<?php echo $color;?>; text-decoration: none; } .post h1 a:hover { color: #<?php echo $color;?>; text-decoration: underline; } .post p { margin-top: 20px; } .blogpic { text-align: center; } .blogpic img { margin-top: 20px; border: 2px solid #CCC; } .category a { background-color: #8a8a8a; border: 1px solid #CCC; color: #FFF; padding: 3px 5px 3px 5px; text-decoration: none; font-size: 11px; margin: 0px 5px; line-height: 25px; } .category a:hover { background-color: #d4d4d4; border: 1px solid #8a8a8a; color: #8a8a8a; padding: 3px 5px 3px 5px; text-decoration: none; } /* Footer Styles */ #footer { background: url(images/footer-column.gif) no-repeat; width: 925px; height: 45px; margin-bottom: 5px; clear: both; padding: 12px 30px 0px 20px; margin-left: 7px; } #footer .copyright { color: #8a8a8a; text-transform: uppercase; } #footer a { color: #<?php echo $color;?>; text-decoration: none; padding: 0px 2px; } #footer p { color: #6e6e6e; text-transform: uppercase; float: left; } #footer a img { margin: 0px; padding: 0px; display: inline; } #footer p.footer-right { color: #6e6e6e; float: right; text-transform: none; margin: 0px 30px 0px 0px; } #footer p.footer-right a { color: #6e6e6e; text-decoration: none; clear: both; padding: 0px 0px 0px 15px; } #footer p.footer-right a:hover { text-decoration: underline; } .wordpress-icon { float: left; margin-right: 10px; margin-bottom: 12px; } .supported { color: #CCC; font-size: 10px; text-align: center; width: 925px; } .supported a { color: #CCC; font-size: 10px; text-decoration: none; } /* Lightbox Images */ #grow { background:#000 url(images/ajax-loader.gif) no-repeat center center; border: none; } #nycloser { background: url(images/closed.png) no-repeat center center; border: none; } #next { background: url(images/next.png) no-repeat center center; border: none; } #next { background: url(images/next.png) no-repeat center center; border: none; } #prev { background: url(images/prev.png) no-repeat center center; border: none; } /* Pagenavi */ .wp-pagenavi a, .wp-pagenavi a:link { padding: 2px 4px 2px 4px; margin: 2px; text-decoration: none; background-color: #8a8a8a; border: 1px solid #CCC; color: #FFF; } .wp-pagenavi a:visited { padding: 2px 4px 2px 4px; margin: 2px; text-decoration: none; background-color: #8a8a8a; border: 1px solid #CCC; color: #FFF; } .wp-pagenavi a:hover { background-color: #d4d4d4; border: 1px solid #8a8a8a; color: #8a8a8a; } .wp-pagenavi a:active { padding: 2px 4px 2px 4px; margin: 2px; text-decoration: none; background-color: #d4d4d4; border: 1px solid #8a8a8a; color: #8a8a8a; } .wp-pagenavi span.pages { padding: 2px 4px 2px 4px; margin: 2px 2px 2px 2px; background-color: #8a8a8a; border: 1px solid #CCC; color: #FFF; } .wp-pagenavi span.current { padding: 2px 4px 2px 4px; margin: 2px; font-weight: bold; background-color: #d4d4d4; border: 1px solid #8a8a8a; color: #8a8a8a; } .wp-pagenavi span.extend { padding: 2px 4px 2px 4px; margin: 2px; border: 1px solid #000000; color: #000000; background-color: #000000; } I hardly ever use css for thimgs like backgrounds, but I have a freelance client that has alot of interesting ideas about how a good website should look so I'm trying to make him happy. When I have: body { background: url('resources/assets/background.jpg') no-repeat bottom left; } in the extranal css it doesn't work. If I put it into the page it works fine. None of the online css resources I've looked at mention why this should be. I've even tried using the complete http://www.server.com/blah/blah/ address and I get the same results. Does this just not work from an external css, or am I missing something? Thanks y'all. Hi there, I've read that for using decorative images in web design its preferred that you apply them as background images instead of using the <img> tag, as using the <img> tag stops the page from displaying until all the images have fully loaded in the browser, where as using a css background image will output the page completely, then start to load in the images (users can start reading the text whilst the images load in). I was just wondering really if anyone else has used this method and gone to the extreme measure if replacing all <img> tags with css background images to dramatically improve their page load speeds? So for example... before Code: <img src="my_thumbnail.jpg" alt="Thumbnail Graphic" title="Thumbnail Graphic" width="100" height="70" /> after Code: .thumb { background-repeat: no-repeat; width: 100px; height: 70px; } <div class="thumb" style="backgound-image: url('my_thumbnail.jpg");"></div> Just an idea really, not sure on how standard compliant it is but I might test it out later to see what speed improvements it brings. I'd be very interested in anyones thoughts Applied this as a div id and a div class, neither of which apply css to the links and text properly. Also hashed all selectors. Some of these are to be followed by regular text/explanations. What am I missing here? Code: .cont { /*container*/ position: relative; background: #FBFBFB; float:left; border: 1px solid #D3D3D3; width: 195px; color:#999; text-decoration: none; } #vt-r { color:#999999; text-decoration: none; font-size: 0.90em; font-weight: 400; margin: 10px 0px 7px 15px; } .vt-r:link { color:#3366CC; text-decoration: none !important; font-size: 0.70em; font-weight: 400; padding: 15px 5px 0 0; margin: 10px 0px 7px 15px; } .vt-r:hover { color:#333; text-decoration: underline; } <div class="cont"> <div id="vt-r"> <a href="/urladdress.htm">LINK1</a><br> Example text.<br> <a href="/urladdress.htm">LINK2</a><br> <a href="/urladdress.htm">LINK3</a><br> </div> </div> The CSS in this file:
Code: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head> <title>Comments on 2005-02-09: February 9, 2005 - Final Game</title> <meta http-equiv="Content-Type" content="application/xhtml+xml; encoding=UTF-8;" /> <link rel="stylesheet" type="text/css" href="comments.css" /> </head> <body> <h2>Posting on 2005-02-09: February 9, 2005 - Final Game in <a href="refresh.php" id="title">XMLBlog</a></h2> <div class="entry"> <p class="normal">I woke up like usual. <em class="entry">My mom couldn't find my lunch bag, so I had to show her.</em></p> <p class="happy">On the way to school, I nearly fell asleep on the bus. <em class="entry">Surprisingly, I felt more rested than before.</em></p> <p class="normal">We had a sub in Physics, along with homework. <span class="happy"><em class="entry">While doing my homework, I talked to this guy that sits nearby.</em></span></p> <p class="happy"><span class="sad">At the beginning of class, I tried to switch with someone to sit near a friend, but our sensei didn't allow it.</span> We just did reading in Japanese, <em class="entry">where I was better than a majority of the class as far as Katakana is concerned</em>. Also, we looked at pizza menus and added up our cost in <ruby><rb>円</rb><rt>エン</rt></ruby>. <em class="entry">some of them looked so delicious, which made me hungry.</em></p> <p class="normal">We watched a video in health, and nothing else.</p> <p class="happy">I basically had English off, since I already finished all of my work. <em class="entry">I also found out that my pre-write can count as a rough draft, since I didn't really do one. Along with that, I get to turn in my completed vocabulary in a day late, since I proved to her that I had it done.</em> For the most part, I just read while listening to music.</p> <p class="sad">Lunch alone, again.</p> <p class="normal">Math was comprised mainly of continuing work on our investigations. <em class="entry">This one didn't have proofs, which made it easier.</em> Due to our teacher talking about homework, we didn't move onto the next one.</p> <p class="normal">We started off with playing our warm-ups for Solo & Ensemble, then went to free time. <em class="entry">For the most part, I goofed off.</em> <span class="hider">Also, someone was trying to lift a stand up, but the top flew off and hit them in the chin, hard.</span></p> <p class="sad">Once home, I found that the euphonium I was waiting for didn't arrive yet.</p> <p class="normal">I had a normal trombone lesson this time. <em class="entry">I made somewhat considerable progress, and was taught better hand positions.</em></p> <p class="happy"><strong class="entry">The euphonium came!</strong> It took a while, but it finally arrived. <em class="entry">The nice <strong class="entry">Bach 5GS</strong> my mom bought was too small, since we thought the instrument would be a small-shank. Still, the instrument came with a 6 1/2 AL from Jupiter, which I shall use for the time being.</em></p> <p class="happy">Later on, I found out that there was a 5GS there. <em class="entry">Earlier, I had called Mills about it, and they eventually replied saying there was one.</em> My dad and I went there and bought it.</p> <div class="story"> <div class="title">Final Game (Bothell Lost N/A)</div> <div class="storybody"> <p class="normal">After a quick lyre readjustment for my new euphonium, my dad and I dashed off to the school...</p> <h>Enter: Eighth Graders</h> <p class="normal">When I got there, I found out how <em class="entry">huge</em> the band was. <em class="entry">There even was another baritone player from my old school!</em> My section commented on how good my instrument looked. <em class="entry">When we warmed up, he also commented on the great tone it had.</em></p> <p class="normal"><span class="sad">We had trouble cramming into the stands, so we had to cover a full section and around 1/3 of another.</span> Throughout the entire game, I told the eighth grader some things to remember, and cracked a few jokes with him.</p> <p class="normal">When the game actually started, we got into our final setup. <span class="sad"><em class="entry">I was near someone that annoyed me.</em></span> <em class="entry">Also, I talked to the 'leader' of the trumpets a bit, as well.</em> The game for our team was going decently. </p> <p class="sad">The guy in front of me got more annoying. He also hit my section where it hurts most. <em class="entry">I kind of got back at him when he snuck my cell phone away from me.</em> Still, he cracked jokes no matter what. <span class="normal"><em class="entry">Also, the group thrusts were a little messy, but decent to say the least. It <strong class="entry">may</strong> be that the eighth graders haven't gotten used to them yet.</em></normal></p> <p class="normal">At half-time, the little girls danced up with the cheerleaders. <em class="entry">Someone made an insightful comment about how their parents paid them to be sluts.</em> <span class="happy"><em class="entry">Also, the trumpet leader danced and sang with them, and a few of us joined in.</em></span> Of course, we played a few songs. The percussion played, and we did our thing.</p> <p class="happy">Rest came with the third quarter. <span class="sad">Though, when I went to buy drinks, they only had <strong class="entry">Powerade</strong>, which was <em class="entry">okay</em></span> Once back in the stands, I shared the candy I bought with a couple of friends while we chatted. Also, I performed the <strong class="entry">Baritone Test</strong> on the eighth grader's instrument, which proved it as a euphonium. <em class="entry">Though, it still seems too light and small to be a real euphonium. It's the same brand as mine, but a lower-end model.</em></p> <p class="normal"><span class="sad">Our team was losing badly.</span> Still, we kept up our little spirit through it all. It all ended as usual.</p> <p class="happy">My section and I talked on the way back from our last game as sophomores. Also, we played us some <strong class="entry">Oompa</strong>!</p> </div> </div> <p class="normal">After the game, I wondered if there was a Denny's party. My dad and I checked twice, most likely finding it as false; so I went home.</p> </div><p>No comments</p><hr /><form action="postcomments.php?ie=&title=February 9, 2005 - Final Game&date=2005-02-09" method="post" name="comment" id="main"> <div class="right"> <img src="comments_files/right_main_bar.png" alt="right_side" /> </div> <div class="left"> <img src="comments_files/left_main_bar.png" alt="left_side" /> </div> <div class="center"> Date: <input type="textarea" class="upper" name="date" value="2005-02-09" readonly="readonly" /> Title: <input type="textarea" class="upper" name="title" value="February 9, 2005 - Final Game" readonly="readonly" /> <br /> Name: <input type="textarea" name="name" class="lower" /> E-mail: <input type="textarea" name="e-mail" class="lower" /> </div> <div class="comment"> <input type="textarea" name="comment" class="text" /> <input type="submit" value="Post!" class="click" /> </div> </form> </body> </html> Greetings Not sure about the best way to go about this. I have an Unordered List that has a set height for the List Items. Like so: Code: #left ul { padding: 0px; list-style-type: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; } #left ul li { text-align: center; float: left; margin-right: 20px; height: 200px; margin-bottom: 20px; } This works fine for most of the pages, but there is one where I really need the height of the <li>'s to be 350px. I tried just adding a class like Code: .comics { height: 350px; } I tried adding this to the <li> Code: <li class="comics"><a href="#"><img src="images/comics/thumbnails/HeldvsHeldin3_sm.jpg" alt="" width="250" height="350"> </a></li> and also just a <span> Code: <li><span class="comics"><a href="#"><img src="images/comics/thumbnails/HeldvsHeldin3_sm.jpg" alt="" width="250" height="350"> </a></span></li> but it still kept the 200px height. Do I need to make a whole new <li> code or am I missing something? I am just wondering if there is a way to simply extend a style rule from one previously defined. For instance, if I have this rule: Code: .textarea-box { color: #990000; background-color: #fff; width: 375px; height: 200px; border: #000 solid 1px; } ...if I want another text area rule to be the same except for one difference, the height should be 80px, do I have to write the rule out again with a new name, incorporating the new height, or is there some nifty way to just change the height in the new rule? Thanks for help with this. j9 Hi , I have writen an advertising script that basicly lists my text link advertisers , this works everywhere on my site except for on my portal page where i have to use an iframe to insert the content instead of an include. the links come up fine however they are the default blue / purple not the colours defined in the style sheet I tried to make a few changes to the style sheet and iframe however nothing seemed to work , so I am hopign somoen can tell me where i am goin wrong first lets start with the example list of links all located on a page called New3.html Code: <a href="this is a test"> test.com</a> <a href="this is a test"> test.com</a> <a href="this is a test"> test.com</a> <a href="this is a test"> test.com</a> <a href="this is a test"> test.com</a> The page with the iframe is called New2.html and contains the following Code: <html> <head> <style type="text/css"> <!-- #main_iframe a:link{ color:purple; } #main_iframea:visited{ color:red; } #main_iframe a:hover { color:black; } #main_iframe a:active{ color: green; } --> </style> <title></title> </head> <body> <iframe id="main_iframe" name="main_iframe" src="New3.html" frameborder="0" scrolling="NO"> </iframe> </body> </html> what I basicly want is for the css in the page New2.html to effect the links that are imported from New3.html unfortunately it's not as easy as just putting the css into New3.html though because the css file used will depends on the skin of the users cms The logic with my above examplkes is that I tried to set the iframe with the id or main_iframe and then i tried to set the link variables for that id , but as you can see it didn't work thankyou so much in advance to anyone that can help Fallen Angel This is killing me! The border of a DIV top is working perfectly on FF but not applying on top in IE 6+7. Here are the class attributes: {padding:1px 7px 3px; font-size:16px; border-color:#555555; border-style:solid; border-width:1px 1px 0px; text-decoration:none; color:#425366; background-color: #abd3ff; font-weight:bold;} Not sure if the problem is on this class or in anything that affecting it. Any suggestions will be great. Ehud How do I apply margins to the outside of all of my frames? Just the outside, treating my frames together as one page and adding blank space to the outside of that page rather than adding margins to each frame separately. i have a table that i'm using within a div. here is the style #content { float: left; padding: 0 20em 4em 3em; } #content table .content { border: 1; bordercolor: #fff; width: 100%; cellspacing: 0; cellpadding: 0; } when i reference the style for the table within the div, nothing is applying. not sure what im doing wrong here. <div id="content"> <table class="content"> please advise.. i'm guessing its syntax How to define a style so that I can just put <table class="abc"> and it will apply to both table, th, td together? currently i am using: table,th,td{ //style here } it work in all table, th, td. But i just sometimes want to write <table class="abc"> and it would apply in all cell within this table. so that I don't need to write <th class="abc"> , <td class="abc"> in every tag in same table. thx. I have a few styles that I was to apply to anything that has a class="title". These work fine when I say, for example: Code: <div class="title">This is my title</div> but, for some reason, they don't work when I use them like so: Code: <table border="0" cellspacing="0" cellpadding="5" class="maintable"> <tr> <td> <div class="title">News Updates:</div> </td> </tr> </table> Can anyone explain to me why this is? If so, how should I go about getting around it? This is a bit puzzling for me. I read that I can apply css to something based on id, which I have been doing, thats how my template is made, USING CSS :S. I need to apply css to an H2 that already has css applied to it but has a different id. Here is the page I need to do it to, view it and see why I need to. http://www.coldfusionzone.com/index.php?p=7 Look down towards where the comments are and youll see Leave a comment I need to change that to where it expands up to 40 pixels from the side, and has a black background without the stinkin date pic next to is . Now that Im talking about it im confused again. Ha ha I had it down pat but now that I need help im confused thats strange. But I need to apply a css style to it when it already has a css it.... Here the css style that controls it is on top and the css style im trying to use is on the bottom. PHP Code: div#content h2 { background: #000 url(images/date.jpg) no-repeat left center; background-color: #232323; color: #5F5F5F; padding: 2px 15px 2px 85px; border: 1px solid #494949; margin-left: 40px; margin-right: 220px; margin-bottom: 10px; margin-top: 0; font-size: 95%; font-weight: normal; } div#content#postcomment h2 { background: #000; background-color: #000000; color: #5F5F5F; padding: 2px 15px 2px 85px; border: 1px solid #494949; margin-left: 40px; margin-right: 220px; margin-bottom: 10px; margin-top: 0; font-size: 95%; font-weight: normal; } |