CSS - Using More Than One Css Sheet
Hello!
I am new to these forums and would like to get some advice or help on something. First of all is it possible to have more than one CSS menu in a web page? and if so, how do you get them to both work without conflicting? Here is the deal. I am wanting to put a sheet that gives me a nice menu bar. But when I put it in, it messes with the entire page. It conflicts with the original sheet for that page and rearranges everything. Anything will be helpful at this point. Thanks in advance. apollo Similar TutorialsHi, I have a style sheet which works fine on my mac, but not on my PC in IE7. I know how to substitute stle sheets based on browsers, but here's the issue at hand. I have 2 styles for the <ul> which follow: ul.nav{ clear:both; width:192px; padding: 0px; display: block; background-color:#000000; margin-top:-11px; margin-left:0px; float:left; } and ul.bodyText{ font-color:#000000 font-size:12px; font-family:helvetica, arial, sans-serif; } it appears that "ul.bodyText is taking on the characteristics of "ul.nav" Or, for some reason, the <ul><li>'s in my Mac look fine, but on my PC, they do not have the indent preceeded by the dot. Here's the site http://www.caillouette.com/NewestSelvan/English/aboutUs.php can anyone tell me why? thanks -Sean Hello I'm having trouble with displaying a background image in a div. It worked fine with embedded CSS but when I changed the CSS to external, the text loads but the bg image doesnt. I'll post some code to explain it... This is in the external style sheet: #navbgtop { position:absolute; left:38px; top:185px; width:194px; height:18px; z-index:2; background-image: url(images/navbartop.jpg); } and yes of course I have made the proper link to it in the <head> tag: <link rel="stylesheet" type="text/css" href="css/nav.css" media="all" /> For some reason the background image wont display. Any ideas? One more question also, does it matter if I use media="all" for the whole website? Or do I even need to bother using media=xyz ? I heard most browsers don't even read that as of yet. Hi all! Hope you are well! Anyway, I have the following in my style sheet.... should this work? PHP Code: td { text-align: centre; } or not? A bit of background. I've just started an IT degree and the first assignment is to create a web page about myself. (I'll post it here once it's up and running). We've got to use a separate as opposed to inline style sheet, and our pages must be validated as part of the assessment. I don't have any trouble validating my XHTML (strict) code but even the simplest style sheet (only a single command) get's rejected. I'm also following the rules set out in the text I've got (The Web Wizards guide to XHTML by Cheryl. M. Hughes). Question. Do I need a DOCTYPE statement in a style sheet? I have a tables layout and for some reason everytime I go to add something to the layout (eg. cutenews) the background disappears. By that I also mean it disappears completely from the html coding in index. This is the style for my layout: body, table, td{ font-size: 9px; font-family: sans-serif; color: #66CCCC; letter-spacing: 1px; margin: 0; } .navi{ font-size: 9px; font-family: sans-serif; margin-top: 5px; text-align: left; } .navhead{ width: 100px; height: 38px; padding-top: 21px; padding-right: 0px; font-size: 10px; text-align: right; color: #CCCCCC; margin-bottom:10px; font-family: monospace; text-transform: lowercase; letter-spacing: 5px; background: black url(Bilder/navheader.jpg); } .head{ width: 310px; height: 38px; padding-top: 10px; padding-left: 25px; font-size: 10px; text-align: left; color: #CCCCCC; margin-bottom: 20px; margin-top: 20px; font-family: monospace; text-transform: lowercase; letter-spacing: 5px; background: black url(Bilder/header.jpg); } .content{ width: 310; padding-left: 10px; padding-right: 10px; color: #66CCCC; text-align: justify; } a:link, a:visited, a:active { text-decoration: none; color: #009999; } a:hover { text-decoration: none; color: #00CC33; } Where and what code can I use for a fixed background? Hi guys, done a few other pages (such as reports and things e.t.c which are basically white pages with text and i get the rightfloat that is on my normal pages appearing all the time!?!? Anyone give me an idea why? tried it on a blank page and still nothing... black page here >>> http://www.generating-sets.com/showissue.php CSS below! Charlie PHP Code: html {height:100%;} body { margin:0; padding:0; height:100%; background-image:url(images/newback.jpg); background-position:top right; background-repeat:repeat-y; background-color:#ffffff; font-family: sans-serif; font-size: .7em; } #wrap { background-image:url(images/newback150px.jpg); background-position:top left; background-repeat:repeat-y; min-height:100%; } * html #wrap {height:100%} div#navbar {padding: 0%; text-align: center; background-image:url(images/newback.jpg); background-repeat: repeat; background-color: #000044; color: #ffffff; margin-bottom: 0px; border-bottom: solid #000000 1px} div#formbox { color: #000000; padding: 2%; border: #000044 solid 1px; } div.displaybox { color: #000000; padding: 2%; margin: 1%; border: #000044 solid 1px; font-family: Times, "Times New Roman", serif; font-weight: bold; text-align: left; font-size: 1.1em; } div#userbar {padding: 0%; text-align: center; background-image:url(images/newback.jpg); background-repeat: repeat; background-color: #000044; color: #ffffff; margin-bottom: 0px; border-bottom: solid #000000 1px} div#topleveladminbar { padding: 0%; text-align: center; background-image:url(images/newback.jpg); background-repeat: repeat; background-color: #000044; color: #ffffff; margin-bottom: 0px; border-bottom: solid #000000 1px } #header { background-color: #000044; background-image:url(images/wel.jpg); width: 100%; background-repeat: repeat; border-bottom: 2px #000000 solid; color: #ffffff; margin:0; padding:0; height:100px; } #left { float:left; width:149px; background-image:url(images/newback.jpg); background-repeat: repeat; color: #ffffff; text-align:center; background-color: #000044; border-right: 1px #000000 solid; } #main { position:relative; margin-left:200px; } #content { text-align:center; padding:4px; margin-right:200px; margin-bottom:150px; text-align:left; } #clearfooter { clear:both; height:80px; overflow:hidden; } #footer { height:40px; background-color: #000044; border-top: 2px #000000 solid; margin:0; padding:0; background-image:url(images/newback.jpg); background-repeat: repeat; margin-top:-0px; color: #ffffff; text-align:center; } div#newsbar {padding: 0%; text-align: left; height:150px; background-image:url(images/newback.jpg); background-repeat: repeat; background-color: #000044; color: #ffffff; margin-left: +150px; margin-right: +10px; margin-top: -180px; border: 2px #000000 solid; width: auto;} code { font-size:0.8em; border:1px solid navy; background-color:white; color:#333333; padding:10px; display:block; width:80%; margin:10px auto; overflow:auto; } h1 {font-size: 1.4em; font-family: Times, "Times New Roman", serif; font-weight: bold; text-align: left;} h2 {font-size: 1.3em; font-family: Times, "Times New Roman", serif; font-weight: bold; text-align: left;} h3 {font-size: 1.2em; font-family: Times, "Times New Roman", serif; font-weight: bold; text-align: left;} h4 {font-size: 1.1em; font-family: Times, "Times New Roman", serif; font-weight: bold; text-align: left;} h5 {font-size: 1em; font-family: Times, "Times New Roman", serif; font-weight: bold; } a:link {color: #ffffff; text-decoration: underline;} a:visited { color: #ffffff; text-decoration: underline;} a:hover {color: #ffffff; background-color: #0000FF; text-decoration: underline;} .displaybox a:link {color: #0000FF; text-decoration: underline;} .displaybox a:visited { color: #0000FF; text-decoration: underline;} .displaybox a:hover {color: #000044; background-color: #EEEEEE; text-decoration: underline;} .redtext { color: #ff0000; font-weight: bold; } .greentext { color: #00ff00; font-weight: bold; } Ok, I just started a new website. I have been putting all of the html on every page. So, when I change one small thing on my Nav Bar, I have to go to every single page and change it! There has to be an easier way, right? Isn't it by using external sytle sheets? I tried this code in my homepage, but it isn't working: Code: <head> <STYLE TYPE="text/css" MEDIA="screen, projection"> <!-- @import url(http://www.freewebs.com/ohhdanggggraphics/BASIC.css); --> </STYLE> </head> Basically on my site the only thing I want to change from page to page is the information in the center table. How would I do this? Thanks for your help My Website Please can anyone tell me why my style sheet is not applying to this page http://www.on-line-biz.com ? Hi there. I have a print style that won't display images when printing.. img {display: none;} I have a certain page where I need the print style sheet but will like the images to print. How can I override the print style for the images? I am trying to use the following in my external style sheet for my links: Code: a:link, a:visited{ color: #006699; text-decoration: underline; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; } a:hover { color: #006699; text-decoration: none; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; } a.big { color: #006699; text-decoration: underline; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; } a.big:hover { color: #006699; text-decoration: none; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; } a.bigger { color: #006699; text-decoration: underline; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 17px; font-weight: bold; } a.bigger:hover { color: #006699; text-decoration: none; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 17px; font-weight: bold; } My problem is that I can't get big & bigger to work properly in Internet explorer. When I hover over the link it goes to its proper size but when not hovering it stays at 11px. Hello.... As I'm sure many that post to this board are, I'm pretty new to CSS. I've been reading about it for years, studying it for several months, dabbling with it for a few weeks, and writing my first useful, semi-complex CSS page for about 2 days.... My page looks exactly like i want it to (at least with my half dozen little tests so far) in Firefox. i started with no CSS, then added more and more, trial and error, until I got it just how I like it. Then I opened it in IE! OH BOY! It doesn't even look close to what it is in FF!!!!! I've read enough about CSS to assume that Firefox rendered it as it's supposed to be rendered, and IE did whatever was convenient for them. Here's the page: http://www.triptrop.com/main.html My intent: I want a header, footer, and 2 equal columns split right down the middle. Each column will contain any number of blocks one right after the other, and independent of the blocks in the other column. Don't pick on my about the colors, I'm just messin around right now Any help would be helpful (by definition) Well, it seems I have a bit of a specific CSS problem. I am building a game in PHP/HTML. I have set a scrollbar in the style so: Quote: margin-right: 9px; overflow-y:auto; overflow-x:hidden; Now I have one page where I want a scrollbar not to the right of the screen but in the first row of the two row table. In essence I want the right cell (with a menu) to stay where it is while the left cell (with text) scrolls. Problem is that I can't get this to work, seeing as the stylesheet overwrites the page code... Any advise/help would be greatly appreciated! Faith I have the following css at the top of a phpbb3 template page that works perfectly fine (phpbb3 properly assigns the {MAX_SURVEY_HEIGHT} variable to the template before it gets parsed by the browser): Code: <style type="text/css"> .survey_max_height { max-height: {MAX_SURVEY_HEIGHT}px; overflow: auto; } </style> But now I need to move that css code to a separate style sheet that phpbb3 does not pass variables to. So my question: is there a way when you call a css element in an html page - i.e. in this example when you use <div class="survey_max_height"> in an html page - to somehow pass a parameter (in this case whatever is in {MAX_SURVEY_HEIGHT}) to the css stylesheet? If anyone can help I am trying to attach an external style sheet in to my site with dreamweaver 8. It is not being recognised as a css file. How do I overcome this problem Andy I have a website/application that I want to give the users the option to select from multiple CSS's on their browser. How do I go about letting the user change the style sheet? -Dynasty Can we use style sheet in windows application? If yes then how, if no then is there any other way to make all forms in the application with same size, with same label size, textbox size....etc. i am trying to make a link at the top of my blog stand out more. however i cant figure out how to override the default style sheet. i am trying to make the following stand out mo <center><font size=4 style="color: red"><u><a href="http://www.jwsuretybonds.com/apps.htm">Apply For Surety Bonds Online</a></u></font></center> at: www.jwsuretybonds.com/blog Hi Please look at this test page of site in progress. http://thetransactiongroup.net/advisor/NEW/index.asp On the left side there is a graphical/stylesheet based nav panel. When you hover over the seventh button from the top, the popout navigation is double spaced. How can I make it like the others: single spaced? Here is the stylesheet for that section of the nav, including my unsuccessful attempt to make it single spacing: #nav li.m7 { background: url("m7.gif") -190px 0 no-repeat; } #nav li.m7 a { background: url("m7.gif") 0 0 no-repeat; height:32px; line-height: normal; } #nav li.m7 a:hover { background-image:none; } #nav li.m7 ul li a { background-image:none; } --- below is complete stylesheet: #nav { padding: 0; margin: 0; width: 190px; } #nav li { list-style: none; position: relative; float: left; margin-bottom: -1px; width: 190px; } #nav a { width: 190px; display: block; height:20px; } #nav li.m1 { background: url("m1.gif") -190px 0 no-repeat; } #nav li.m1 a { background: url("m1.gif") 0 0 no-repeat; } #nav li.m1 a:hover { background-image:none; } #nav li.m2 { background: url("m2.gif") -190px 0 no-repeat; } #nav li.m2 a { background: url("m2.gif") 0 0 no-repeat; } #nav li.m2 a:hover { background-image:none; } #nav li.m3 { background: url("m3.gif") -190px 0 no-repeat; } #nav li.m3 a { background: url("m3.gif") 0 0 no-repeat; } #nav li.m3 a:hover { background-image:none; } #nav li.m3 ul li a { background-image:none; } #nav li.m4 { background: url("m4.gif") -190px 0 no-repeat; } #nav li.m4 a { background: url("m4.gif") 0 0 no-repeat; } #nav li.m4 a:hover { background-image:none; } #nav li.m4 ul li a { background-image:none; } #nav li.m5 { background: url("m5.gif") -190px 0 no-repeat; } #nav li.m5 a { background: url("m5.gif") 0 0 no-repeat; } #nav li.m5 a:hover { background-image:none; } #nav li.m5 ul li a { background-image:none; } #nav li.m6 { background: url("m6.gif") -190px 0 no-repeat; } #nav li.m6 a { background: url("m6.gif") 0 0 no-repeat; } #nav li.m6 a:hover { background-image:none; } #nav li.m7 { background: url("m7.gif") -190px 0 no-repeat; } #nav li.m7 a { background: url("m7.gif") 0 0 no-repeat; height:32px; line-height: normal; } #nav li.m7 a:hover { background-image:none; } #nav li.m7 ul li a { background-image:none; } #nav li.m8 { background: url("m8.gif") -190px 0 no-repeat; } #nav li.m8 a { background: url("m8.gif") 0 0 no-repeat; height:36px; } #nav li.m8 a:hover { background-image:none; } #nav li.m9 { background: url("m9.gif") -190px 0 no-repeat; } #nav li.m9 a { background: url("m9.gif") 0 0 no-repeat; } #nav li.m9 a:hover { background-image:none; } #nav li.m9 ul li a { background-image:none; } #nav li.m10 { background: url("m10.gif") -190px 0 no-repeat; } #nav li.m10 a { background: url("m10.gif") 0 0 no-repeat; } #nav li.m10 a:hover { background-image:none; } #nav li.m11 { background: url("m11.gif") -190px 0 no-repeat; } #nav li.m11 a { background: url("m11.gif") 0 0 no-repeat; } #nav li.m11 a:hover { background-image:none; } #nav li.m12 { background: url("m12.gif") -190px 0 no-repeat; } #nav li.m12 a { background: url("m12.gif") 0 0 no-repeat; } #nav li.m12 a:hover { background-image:none; } #nav li.m13 { background: url("m13.gif") -190px 0 no-repeat; } #nav li.m13 a { background: url("m13.gif") 0 0 no-repeat; } #nav li.m13 a:hover { background-image:none; } #nav li.m14 { background: url("m14.gif") -190px 0 no-repeat; } #nav li.m14 a { background: url("m14.gif") 0 0 no-repeat; } #nav li.m14 a:hover { background-image:none; } #nav li.m15 { background: url("m15.gif") -190px 0 no-repeat; } #nav li.m15 a { background: url("m15.gif") 0 0 no-repeat; } #nav li.m15 a:hover { background-image:none; } #nav li.m16 { background: url("m16.gif") -190px 0 no-repeat; } #nav li.m16 a { background: url("m16.gif") 0 0 no-repeat; } #nav li.m16 a:hover { background-image:none; } #nav li.m17 { background: url("m17.gif") -190px 0 no-repeat; } #nav li.m17 a { background: url("m17.gif") 0 0 no-repeat; } #nav li.m17 a:hover { background-image:none; } #nav li.m17 ul li a { background-image:none; } #nav li.m18 { background: url("m18.gif") -190px 0 no-repeat; } #nav li.m18 a { background: url("m18.gif") 0 0 no-repeat; } #nav li.m18 a:hover { background-image:none; } #nav ul { padding: 0; margin: 0; width: 240px; border:1px solid #555; background-color:#fff; position: absolute; visibility:hidden; left:auto; margin-left: 189px; margin-top: -22px; } #nav li ul.double { margin-top: -32px; } #nav li ul li a { width: 230px; border-top:1px solid #fff; border-right:1px solid #555; border-bottom:2px solid #555; border-left:1px solid #fff; color:#000; height:17px; line-height:17px; text-decoration:none; padding-left:10px; background-image:none; } #nav li:hover ul, #nav li.sfhover ul { visibility:hidden; } #nav li:hover ul, #nav li.sfhover ul { visibility:visible; } I'm having a problem getting the text in my nav bar to be formatted with my CSS sheet. ***HTML*** <div id="navbar"> <ul id="nav"> <li class="current_page_item"><a href="">Home</a></li> <li><a href="">Features</a></li> <li><a href="">Purchase</a></li> <li><a href="">Theme Demo</a></li> <li><a href="">Blog</a></li> <li><a href="">Affiliates</a></li> <li><a href="">Support</a></li> <li><a href="">Contact Us</a></li> </ul> </div> ***CSS*** #navbar { width: 960px; height: 47px; do not change Code: Original - do not change Code font-size: 12px; font-family: Tahoma, Geneva, sans-serif; color: #FFF; font-weight: bold; font-size: 12px; font-family: Tahoma, Geneva, sans-serif; color: #FFF; font-weight: bold; margin: 0px auto 0px; padding: 0px; } The text values aren't able to change for some reason, but the width and height values, padding, etc are. If someone could please help me trouble shoot that would be great. Thank you Paul I'm using CSS for style and positioning. I have this information in my style.css file. I import the file into my html file with this code: PHP Code: <head> <style type="text/css" title="currentStyle"> @import "style2.css"; </style> </head> When calling the page with the MS Internet Explorer, it first writes all the text out unformatted and then it applies the format. I know it does it this way because I can see it. It is too slow. Sometimes, it's just a flash, other times it's a whole second or two. Regardless, I don't even want to notice the flash from unformatted to formatted. I notice that other pages don't seem to do this. How do I accomplish this? What am I doing wrong? |