CSS - Wrong Headers!
This may not belong here. But it's about a CSS file, so I'll explain:
I have css files in that are not having any effect. Using Firebug, I think I've narrowed the problem down to a server-side issue. Here are my headers: Request: Host: host User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 Accept: text/css,*/*;q=0.1 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Connection: keep-alive Referer: https:/host/page Cookie: ........... Response: Date: Tue, 27 Jul 2010 18:34:59 GMT Server: Apache/2.2.3 (Red Hat) X-Powered-By: PHP/5.1.6 Content-Length: 2613 Connection: close Content-Type: text/html; charset=UTF-8 It looks like the server is delivering the css file as text/html and the browser is not interpreting the css styles. Other css files work. For example (main.css): Request: Host: host User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 Accept: text/css,*/*;q=0.1 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Connection: keep-alive Referer: https://host/page Cookie: ..... Response: Date: Tue, 27 Jul 2010 18:34:59 GMT Server: Apache/2.2.3 (Red Hat) Last-Modified: Tue, 27 Jul 2010 16:21:07 GMT Etag: "136d7c-cba-e36a82c0" Accept-Ranges: bytes Content-Length: 3258 Connection: close Content-Type: text/css My server is Apache 2.2.3. I've tried adding "AddType text/css .css" to the httpd.conf file. But that had no effect. Any suggestions? Similar TutorialsHello, I am working on a web site with a two column layout, "Content" on the left and "Sidebar" on the right. Sidebar 1) Sidebar is divided into sections (div). Each section has header. Content Content can display the following data (each is a different page): 2) In HomePage.html a list of blog articles is displayed. Each blog article has a title. 3) In ShowArticle.html a specific article is displayed (Title, Body, Tags). 4) In Documents.html a list of documents is displayed but in this case the page has a title and a subtitle. For example: Documents here you can find all the documents you need. 5) In Contact.html a title with subtitle is displayed just as in (4). After the title and subtitle there is only paragraphs with the contacts. So basically that's it ... I am trying to figure the correct way to use <h1>, <h2>, etc. The text font, weight and color is always the same ... what changes is the size. For example, if in HomePage the Post Header could be <h1> because there is no page title, in Documents there is a page title and a subtitle (should be this a paragraph? it's more like a description phrase then a section separator). So in Documents each Document could have <h3> ... And if there is a Page Title (h1) then should side bar have <h2>? I suppose it is more correct to be h1.Sidebar. And in ShowArticle I am displaying one article. Should I use the <h1> in the title? Then it would be the same tag then in Sidebar section ... I have been looking in a few web sites and blogs and they differ ... Anyway, I am just trying to make this right ... Any help is welcome. Thanks, Miguel In the attached gif, you should be able to see exactly what I mean, if I don't explain it well enough. I have a containing block, #content_main, defined as such: Code: #content_main { margin-left: 170px; padding: .5cm .25cm 50px; } Headers (h1, h2, h3, etc) are used inside #content_main and are defined like this: Code: h1, h2, h3, h4, h5, h6 { font-family: georgia, serif; border-bottom: 1px solid #009; } If you look at the attached gif, you'll see the problem. The top one is what happens. It extends the border-bottom to the width of the containing block, even though it places the text correctly. The second one "Something Else" is what I want it to look like. I edited that with Fireworks. Since it renders the same in Firefox and IE, I figure it's my code that's wrong. Any thoughts? MPEDrummer I have this problem making this menu and I have multible <h1></h1> on each title of the of stuff. It seems that the text gets bigger and bigger then when its to big then the text in the <h1> goes back smaller. Is there a way to fix this? Here is my code. Code: h1 { font-family: cursive, sans serif; font-weight: normal; font-size: 200%; font-style: cursive;} EDIT:The strange thing is that I know of this wird effect only happens in IE. Thank you, sorry to be a bother but I do want to have a good first impression on my site that I am working for Ernies Bar & Grill at my town. We have a table with a lot of data in it that has both horizontal and vertical scrolling. What I would like to do is keep the header row fixed in one position when the user scrolls vertically but i want it to scroll with the page when it scrolls horizontally. I've thought of a couple potential methods: position:fixed which doesnt seem to work. My other is actually making the header a bunch of divs that are drawn via javascript by looping over the cells and using the offset left of each to determine the width of the headers. Can anyone think of a better method? Hi be gentle with me im new I am trying to put a backgroung image in my div the code i have used is below, in my styles file i have .backgroundbox { background-attachment: fixed; background-image: url(backpat1.png); background-repeat: no-repeat; background-position:top; height:600px; width:900px; position:relative; background-position: top left; top: 0px; left:0px;} and in the body i have <div class="biggestcolumn" "backpat1" align="center"> if someone could please tell me what ive done wrong. hey all, i am working on new site but it is displaying wrong in IE (surprise surprise). i have been playing around to see if i can get it sorted but am not having any luck, if anyone can offer an idea that would be appreciated. here is the CSS Code: <style type="text/css"> html, body {padding: 0; color: #000; background: #eee; font-family: Arial, Veranda, sans-serif; margin: 0 140px 0 140px;} h1 {color: #FFF; background: url('smallpardimg.jpg') center no-repeat #eef; font: bold 200%/1em Arial, Verdana, sans-serif; padding: 3em 1em 0; margin: 0 0 0 0; border-left: 1px solid gray; border-right: 1px solid gray;} #main {font-size: small; color: #AAA; background: #FFF; margin: 0; padding: 2.5% 12.5%; clear: left; border-top: 1px solid gray;} #nav {margin: 0; padding: 0 0 0 0; float: left; background-color:#eef; border-left: 1px solid gray; border-right: 1px solid gray;} #nav li {list-style:none; float: right; font-size: 12px; line-height: 20px; white-space: nowrap;} #nav a {display: block; float: left; padding: 0 10px 0 10px; text-decoration: none; font-weight: normal; border: 1px solid; border-color: #EEF #EEF #EEF #EEF; color: #333; width: .1em;} html>body #nav a {width: auto;} /* fixes IE6 hack */ /* Commented Backslash Hack hides rule from IE5-Mac \*/ #nav a {float: none;} /* End IE5-Mac hack */ #nav a:hover {background-color: #eef; color: #ccc; border-color: #eee #CCC #eee #ccc;} </style> and here is how it is being used in the html Code: <h1></h1> <ul id="nav"> <li><a href="/render/">?</a></li> <li id="current"><a href="/newmed/">contact us</a></li> <li><a href="/photos/">about globalhotel</a></li> <li><a href="/design/">my account</a></li> <li><a href="/webdev/">hotels</a></li> </ul> <div id="main"> <p> Lorem ipsum, dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum, dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum, dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. </p> </div> and finally here is a link to the page where i am having probs. thanks in advanced RF O.K. Here is my style sheet code ... Code: <style type="text/css"> channel-container { background-color:#66FF66; width:500px; margin:auto; clear:both; } .channel { background-color:#CCFF00; width:465px; margin:auto; } .channel# { background-color:#99CC99; width:35px; margin:auto; } </style> and here is some of the html .... Code: <div class=channel-container> <div style=channel>A&E</div> <div style=channel#>118</div> </div> <div class=channel-container> <div style=channel>ABC Family</div> <div style=channel#>180</div> </div> <div class=channel-container> <div style=channel>America Live</div> <div style=channel#>219</div> </div> <div class=channel-container> <div style=channel>Angel One</div> <div style=channel#>262</div> </div> <div class=channel-container> <div style=channel>Angel Two</div> <div style=channel#>266</div> </div> <div class=channel-container> <div style=channel>Cartoon Network (East)</div> <div style=channel#>176</div> </div> <div class=channel-container> <div style=channel>Cartoon Network (West)</div> <div style=channel#>177</div> </div> Now believe me I know this is not aesthetically appealing ... However I am just trying to get a base layout where I have a container I can change the background color on, or alter as I wish in the future. Then I want the channel name to show up, with the channel number in a separate cell .. All easily changable at will through the CSS rule modifications. Can anyone tell me what it is I am doing wrong here ? I am getting no formatting at all with the code I am using. Hello, I'm confused about how exactly to name classes in a specific situation. I'm getting unexpected results, and I'm not sure if it's browser support or my code. Does .classy a { something: something; } describe all anchors nested in an element with the class "classy"? Can I do that even? Or is it the same as .classy, a { something: something; } To describe two things that both have the same styles. Do I need comma's or is .classy .classless { something: something; } the same thing as .classy, .classless { something: something; } Thanks I am trying to acheve a 2 coulumn layout, but I keep getting problems wilt the side-box. I am designing this layout for a system where users can insert content, so I am not sure how much content will be added to the two boxes. I am trying to show what I want to acheve in a picture-file: http://www.student.uib.no/~st11920/...out_problem.gif No matter how I do it I cannot get the surrounding DIV to expand horisontally according to the fixed content DIV's height. It will gladly expand to the liquid sized one, but the other one wich I have positioned absolute will not affect the surrounding DIV. My guess is that this is the expected result. The HTML is he http://www.student.uib.no/~st11920/...divproblem.html But my question is how can I do what I want with CSS? Have some problem with my css. Would appreciate some comments on how to do this: Here is the code: with explanation of what's not working: It's a small "complete" htm file..... Code: <html> <head> <style> .outer { display: block; background-color: #bbb; border: 0; padding: 0; text-align: center; font-family: Arial,sans-serif; font-size: 12px; color: #000; text-decoration: none; font-weight: normal; } .outer a { display: block; color: #000; text-decoration: none; font-weight: normal; } .outer a:hover { text-decoration: underline; color: #fff; } .outer a:hover .text-top { text-decoration: none; color: #000; } </style> </head> <body style="background-color:#888;"> <br><br> Why is the top text underlined with a white line when hover and text itself is black?<br> I want it to work like this:<br> When I hover over any area inside the outer div then I want<br> Bottom text: white and underlined<br> Top text: no change<br><br> NN 7.2: Same problem as above<br> FF 1.04: same problem as above<br> Opera 8: same problem as above<br> In opera 8 there is also some small underline below image: How do I get rid of that?<br><br> IE 6: Works as it should<br><br><br> <center> <table border=0 cellpadding=0 cellspacing=0 width=300px> <tr> <td> <div class="outer"> <a href="#"> <div class="text-top"> <br>Top text<br><br> </div> <div class="text-img"> <img src="snake.jpg" height="100px" width="100px" alt="" border="0"> </div> <div class="text-bot"> <br>Bottom text<br><br> </div> </a> </div> </td> </tr> </table> </center> </body> </html> My site looks as expected in IE, but Netscape...Fotget it. I can't figure it out, i've been at it for a long time. goto www.eldore.com Attached is my css file. Thanks Hi i'm using the html below, for some reason in Dreamweaver the two images in the two lower cells appear on the left, and the text on the top button is up the top of the table cell. Is my code creating a conflict somewhere that would cause this? When I open it in Firefox or IE it looks fine, its just looking weird in design mode. HTML Code: Original - HTML Code <table width="160" cellpadding="0" cellspacing="0" border="0" bgcolor="#454545"> <tr> <td id="menubuttonselected">News</td> </tr> <tr> <td id="menubuttonsmall" align="center"><a href="">2009</a></td> </tr> <tr> <td id="menubuttonsmall" align="center"><a href="">2008</a></td> </tr></table> <table width="160" cellpadding="0" cellspacing="0" border="0" bgcolor="#454545"> <tr> <td id="menubuttonselected">News</td> </tr> <tr> <td id="menubuttonsmall" align="center"><a href="">2009</a></td> </tr> <tr> <td id="menubuttonsmall" align="center"><a href="">2008</a></td> </tr></table> with these style sheets: Code: #menubuttonsmall a { display:block; font: bold 14px/1 sans-serif; color:#000000; background: url("..//gfx//common/button_menu_sub.jpg") 0 0 no-repeat; text-decoration: none; height: 21px; padding-top: 10px; border-top: 1px; border-top-style: solid; width: 144px; margin: 0; text-align: center; } Code: #menubuttonselected { background: url("..//gfx//common/button_menu.jpg") 0 0 no-repeat; background-position: -480px 0; color: #FFFFFF; font: bold 14px/1 sans-serif; text-decoration: none; text-align: center; padding-top: 0px; height: 40px; } Cheers, Mark Hi I am trying to setup a left border on my tabs here, no matter what combination I try I cannot get a left border exactly like the others without giving the wholebox a full border (dont want this!!) Look at the example below.. Code: /* TESTING TABBED BROWSERS*/ } .tabbed-box { width: 100%; background: #fff url(tabbed-body-bg.jpg) repeat-x bottom; /*border: 1px solid #ddd; border-bottom:none; border-left:none; border-right:none;} */} .tabbed-box .tabs li { list-style: none; float: left; } .tabbed-box .tabs li a { display: block; width: 100px; padding: 5px 0; font-weight: bold; text-align: center; text-decoration: none; color: #888; background: #fff url(tabbed-tab-bg.jpg) repeat-x bottom; border-left: 1px solid #ddd; border-bottom: 1px solid #ddd;} .tabbed-box .tabs li:first-child a { border-left: 1px solid #ddd; } .tabbed-box .tabs li a:hover { color: #333; } .tabbed-box .tabs li a:focus { outline: none; } .tabbed-box .tabs li a.active { background: #fff; color: #333; border-bottom: 1px solid #fff; border-left: 1px solid #ddd; margin-left: 5px; } .tabbed-content { padding: 3em 1em 1em 1em; display: none; } Screen Shot Here (not aloud to post URLS) --- >freeimagehosting.net/uploads/4e9d9acdf7.jpg Any help much appreciated!! Hello all, I am completely new to web development and am trying to learn by building my own website. The issue I have run into is getting my css to work on my page. HTML: <html> <head> <LINK rel="stylesheet" type="text/css" href="style.css"> <title> The Shore Report </title> </head> <body> <img src="TheShoreReport.jpg" > <img src="Web Background.jpg" > </body> </html> CSS: body { background-color:#b0c4de; } Is there something wrong with my link or what? My site looks as expected in IE, but Netscape...Fotget it. I can't figure it out, i've been at it for a long time. goto www.eldore.com Thanks Hi I am using an external stylesheet to try to format some text, but its not working. This is what is in my stylesheet? PHP Code: .small{ font-size: 11px; font-family: verdana, arial, tahoma;} I then used this: PHP Code: <span class="small"><font color="#000000">my text</font></span> But its not formatting it. Any ideas? if you take a look at this site: www.plumstead-mosque.co.uk you will see that the link section (IE) if you hover over it the color doesnt fill the whole section wheras in FF it does.. i was wondering if you could tell me how to fix it? css: (relevant) Code: #menu a {display:block; border-bottom:solid black 1px; font-weight:bold; text-align:left; padding:0em; margin:0em;} #menu ul, #menu li{ margin:0em; padding:0em; } #menu {list-style-type:none; width:100%; float:left; padding:0em; margin:0em; margin-bottom:1.5em;border:1px solid black;} #menu ul {list-style-type:none;} #menu li { position:relative;} I have a DIV which is styled to have a bottom border. Nested inside of this DIV is another DIV, which defaults to display:none, but I'd like to use JavaScript to turn it to display:block. When this happens, it works fine, but the bottom border for the parent DIV does not encapsulate the nested DIV as I would I assume it should. Am I totally missing something here, or is this just standard behavior? Here's the code. There is no other styling. Code: <style type="text/css"> .multiCheck { padding:5px; margin:10px 0; border-top:dotted 2px #CCCCCC; border-bottom:dotted 2px #CCCCCC; } .multiCheck .title { padding:5px; font-size:1.2em; color:#003366; font-weight:bold; } .multiCheck .checkBox { margin-left:10px; } </style> </head> <body> <div class="multiCheck"><div class="title"><input type="checkbox" name="mp_arg2_toggle" onClick="document.getElementById('newsLocations').style.display='block';" value="location"/> Location News:</div> <div class="checkBox" id="newsLocations" style="display:none;"> <div style="float:left; width:150px;"> <input type="checkbox" name="mp_arg2[]" value="27" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> <input type="checkbox" name="mp_arg2[]" value="25" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> <input type="checkbox" name="mp_arg2[]" value="19" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> <input type="checkbox" name="mp_arg2[]" value="99" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> <input type="checkbox" name="mp_arg2[]" value="20" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> <input type="checkbox" name="mp_arg2[]" value="2" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> <input type="checkbox" name="mp_arg2[]" value="1" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> <input type="checkbox" name="mp_arg2[]" value="3" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> <input type="checkbox" name="mp_arg2[]" value="4" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> <input type="checkbox" name="mp_arg2[]" value="26" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> </div> <div style="float:left; width:150px;"> <input type="checkbox" name="mp_arg2[]" value="21" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> <input type="checkbox" name="mp_arg2[]" value="5" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> <input type="checkbox" name="mp_arg2[]" value="6" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> <input type="checkbox" name="mp_arg2[]" value="22" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> <input type="checkbox" name="mp_arg2[]" value="7" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> <input type="checkbox" name="mp_arg2[]" value="8" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> <input type="checkbox" name="mp_arg2[]" value="9" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> <input type="checkbox" name="mp_arg2[]" value="10" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> <input type="checkbox" name="mp_arg2[]" value="17" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> <input type="checkbox" name="mp_arg2[]" value="11" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> </div> <div style="float:left; width:150px;"> <input type="checkbox" name="mp_arg2[]" value="24" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> <input type="checkbox" name="mp_arg2[]" value="12" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> <input type="checkbox" name="mp_arg2[]" value="23" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> <input type="checkbox" name="mp_arg2[]" value="13" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> <input type="checkbox" name="mp_arg2[]" value="14" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> <input type="checkbox" name="mp_arg2[]" value="15" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> <input type="checkbox" name="mp_arg2[]" value="16" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> <input type="checkbox" name="mp_arg2[]" value="18" onClick="populateTitle(this,'mp_arg1');"/> Location<br/> </div> </div></div> Thanks in advance, Colin |