CSS - Stylesheet Help For Proper Image Display...
Hello all. May I ask for your help? I just finished developing a site for personal page (e.g. blog, myspace, etc) promotion, but I'm having troubles correcting my stylesheet. The home page is basically a bunch of pictures of people, but I don't have anyone loaded in the system yet, so I can't get a feel for whether or not it is behaving properly. This probably sounds like SPAM, but oh well. Would anyone be willing to give it a try and provide your thoughts in this post? The web address is http://www.klik.us.
Thanks a ton for any help/comments. Similar TutorialsThis stylesheet was developed by volunteers (local students) who weren't asked to design for cross-browser compatibility. In FF and Netscape the background CSS 'runs out' before the content does (problematic with black background) and there isn't any space between objects (adjoining columns, text etc.). Because I need to make the fix asap (and I am not well versed in CSS for layout) my options here are a) pay my ISP web team to make the adjustments, b) redesign site templates using tables (which I can do, but I know is regressing) or c) get some specific feedback from you folks. The code does not validate (re. W3C CSS Validator) but I'm not experienced enough in this to know how to fix it. In the long-term, I am definitely looking to improve my knowledge in this area and appreciate your patience with me. I have copied the code below. Many thanks for any feedback, resources, pointers etc. you may be able to provide. body{ background-color: Black; background-position: center; text-align: center; vertical-align: center; margin: 2px; } h4{ font-family: Arial, Helvetica, sans-serif; font-size: 9pt; font-weight: bolder; color: black; } h6{ font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 7.5pt; font-weight: normal; color: black; } h1{ font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bolder; color: black; text-transform: uppercase; } h2{ font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9pt; font-weight: bold; color: #8B0000; } div#wrapper{ background-position: center; background-color: #F0F1EB; width: 762px; height: 420px; margin: 0px; border: 1px solid #black; padding: 0 px; } div#top{ background-position: center; background-image: url(../images/top.jpg); width: 760px; height: 123px; margin: 0px; border: 0px; padding: 0 px; text-align: right; vertical-align: top; text-transform: uppercase; } div#toplinks{ background-position: center; width: 634px; height: 15px; margin: 0px; border: 0px; padding: 2 px; float: right; vertical-align: top; font-family: Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bolder; text-align: center; color: white; } div#midlinks{ background-position: center; background-color: #F0F1EB; width: 760px; height: 17px; margin: 0px; padding: 0 px; border-bottom: 1px solid #9E9E9E;; border-left: 0px; border-right: 0px; border-top: 1px solid #9E9E9E; } div#midleft{ background-color: white; width: 126px; height: 16px; margin: 0px; padding: 6 px; float: left; border-bottom: 0px; border-left: 0px; border-right: 1px solid #9E9E9E; border-top: 0px; text-transform: uppercase; color: red; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bolder; text-align: right; } div#midleft a, div#midleft a:hover, div#midleft a:visited, div#midleft a:active{ text-transform: uppercase; color: red; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bolder; text-align: right; text-decoration: none; } div#midright{ width: 631px; height: 16px; margin: 0px; padding: 6 px; float: right; border:0px; font-family: Arial, sans-serif; font-size: 11px; font-weight: bolder; text-align: left; color: white; text-transform: uppercase; } div#midright a, div#midright a:hover, div#midright a:visited, div#midright a:active{ font-family: Arial, sans-serif; font-size: 11px; font-weight: bolder; text-align: left; color: #990000; text-transform: uppercase; text-decoration: none; } div#left{ background-position: center; background-color: #F0F1EB; width: 125px; margin: 0px; padding: 7 px; float: left; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; text-transform: uppercase; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 10px; font-weight: 900; text-align: right; } div#left a, div#left a:hover, div#left a:visited, div#left a:active{ text-transform: uppercase; color: #990000; font-family: Arial, Helvetica, sans-serif; font-size: 10px; font-weight: 900; text-align: right; text-decoration: none; } div#main{ background-position: center; background-color: White; width: 635px; height: 470px; margin: 0px; padding: 0 px; float: right; border-left: 1px solid #9E9E9E; } div#mainl{ background-position: center; background-color: white; width: 310px; height: 289px; margin: 0px; border: 0px; padding: 10 px; float: left; font-family: Arial, Helvetica, sans-serif; font-size: 9pt; text-align: left; color: black; } div#main2{ background-position: center; background-color: white; width: 317px; height: 450px; margin: 0px; padding: 10 px; float: right; border-bottom: 0px; border-left: 1px solid #9E9E9E; border-right: 0px; border-top: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 9pt; text-align: left; color: black; } div#main1col{ background-position: center; background-color: white; width: 625px; height: 289px; margin: 0px; padding: 10 px; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 9pt; font-weight: normal; text-align: left; color: black; } div#main1col td, div#mainl td, div#main2 td{ font-family: Arial, Helvetica, sans-serif; font-size: 9pt; font-weight: normal; text-align: left; color: black; } div#main1col a, div#main1col a:hover, div#main1col a:active, div#main1col a:visited { font-family: Arial, Helvetica, sans-serif; font-size: 9pt; font-weight: normal; text-align: left; color: #8B0000; text-decoration: underline; } div#mainl a, div#mainl a:visited, div#mainl a:hover, div#mainl a:active { font-family: Arial, Helvetica, sans-serif; font-size: 9pt; font-weight: normal; text-align: left; color: #8B0000; text-decoration: underline; } div#main2 a, div#main2 a:visited, div#main2 a:hover, div#main2 a:active{ font-family: Arial, Helvetica, sans-serif; font-size: 9pt; font-weight: normal; text-align: left; color: #8B0000; text-decoration: underline; } .container { position: relative; left: 1px; top: 1px;} .text {position: absolute; left: 5px; top: 0px;} .container a, .container a:visited, .container hover, .container a:active {color: #666; text-decoration: none;} .text a, .text a:visited, .text hover, .text a:active{color: white; text-decoration: none;} Hi, I have a question about setting up the Body background-image via a linked external stylesheet. I have a index.html file and a myStyle.css file. I want to setup the background to load an image file, test.JPG. When I embed the following in my index.html, I see the background show up: ** inside index.html file ** <BODY STYLE="background-image: url(test.JPG);"> blah </BODY> BUT, when I define my background in the externally linked myStyle.css file, the background does not load: ** inside myStyle.css file ** BODY { background-image: url(test.JPG); } ** inside index.html file ** <LINK REL="stylesheet" TYPE="text/css" HREF="myStyle.css"> <BODY> blah </BODY> </LINK> Please help. thanks! I cant seem to get this to position correctly in firefox. Looks great in IE though... Perhaps I should just use divs with margins rather than ul's Quote: Dan Cederholm of SimpleBits: It's important to note that the cascading effect of CSS still applies, and alternate style sheets work just like any other style sheet, in that only common rules are overridden when the alternate styles are active. So if we had layout, positioning, and other site-wide rules in default.css that weren't repeated in the alternate style sheets, those default rules would still work. I'm making a site that has a default stylesheet with a fixed layout and an alternative one with a fluid layout. The problem I'm having is the alternative sheet not inheriting css from the default stylesheet even though the rules are not overridden. At the moment, my alternative stylesheet is an exact copy of the original (everything included) with only 3 width values changed to percentages. Theoretically, I should be able to only include these three rules alone in the alt sheet, as rules are carried over from the default sheet unless overridden. However, when I do try to reduce the alt sheet to just: Code: #container { width: auto; } #main { width: 65%; } #navbar { width: 30%; } all unincluded formatting is lost. Am I doing something wrong? Cheers, Sam. I have a very strange problem. My firefox is ignoring the changes I made to the style sheet. I have this in my webpage and the style.css file location is right (one directory up). <link href="../style.css" rel="stylesheet" type="text/css"> Because it's ignoring my new changes, I deleted everything in my style.css file, and the page still displays as though the file exists. However, if I delete the above line, then the page will display without any style. IE is loading with the changes I made though. I have also checked my stylesheet with the W3C css validation and it has no error. So, any body know why this is happening? On button on my website store on CSS but when user turn off "load image automatically" then images don't display. Please show me how to fix it. Thanks a lot. Hi there www/argyllplotsforsale/co/uk I am currently building a website. I managed to get the CSS working before I uploaded it on the server. I have a header image above the orange Nav Bar. Soon as I uploaded it to the server it doesn't display and I am so confused. The style sheet in question is argyllplotsforsale/co/uk/style.css I cannot understand why the image is not displaying. Help would be greatly appreciated. Thanks Cakeface Hi there. I've got two styles defined for links...one of which is Code: A:link#redir { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #C90016; text-decoration:none; } A:visited#redir { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #C90016; text-decoration:none; } A:hover#redir { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #C90016; text-decoration:none; display:inline; } when i want the link to be the 'redir' style, i put Code: <a href="http://www.whatever.com" id="redir">clicky</a> but that won't validate because id's are supposed to be unique. what's the deal? thanks! I was wondering does anyone know where I can obtain the Internet Explorer 6 stylesheet for Windows XP? The UI components in IE6 look different in Windows XP than IE6 for Windows 2000. I would like to obtain the stylesheet if it is available somewhere. Thanks for your help. Val I have three different css Stylesheets. Now I want to give access to my users to change their required styles using dropdownlist. And next time when the user is login in the same last selected style sheet should be displayed to him. How can i do this please help me its urgent ? Hi Guys, I am new to CSS, i have an image (attached) and it will not display as a background image. The other images I have will no problem. It is def something about the image because i have renamed it e.t.c Could someone help? Image is attached! Can you get it to display? Charlie Hello, I'm having a problem that I can't seem to fix - and I've been at it for two days now, I think it's time for an outsider's point of view. First of all, I've googled and researched to no end about this - and others have had the same problem as me, but for some reason nothing that's been suggested has fixed it. With any luck it's just some stupid typo I'm missing or something . I'm using Dreamweaver CS3 to make a site, but I'm not using the WYSIWYG editor, I'm just using that to see what it looks like as a quick-view during development, and uploading it via FTP to the server to see a more accurate representation of it (basically, the code isn't written by DW). Here's the problem. In DW, the "background-image" tag in the CSS file is displaying all of the images perfectly, but when I upload the site - the images simply don't appear, but if you resize your browser window you can tell by the way the scrollbars are behaving that it is holding places for the images. I've tried everything I can think of, including using the "overflow" tag, trying different ways of writing the file paths (absolute vs. relative), and I've looked through every line of the code over and over again. CSS file: Code: @charset "utf-8"; /* CSS Document */ body { margin: 0px; padding: 0px; font-family: Georgia, "Times New Roman", Times, serif; font-color: #000000; background-color: #f5f0c4; } .pageholder { position: relative; width: 1000px; height: 750px; margin-left: auto; margin-right: auto; } .outerbg { position: absolute; left: 50px; width: 904px; height: 654px; margin: auto; background-image: url(../images/bg/outer.png); background: no-repeat; } .innerbg { position: absolute; top: 100px; left: 150px; width: 702px; height: 502px; margin: auto; background-image: url(../images/bg/inner.png); background: no-repeat; } .footer { position: absolute; top: 675px; left: 154px; width: 692px; height: 32px; margin: auto; background-image: url(../images/bg/bar.png); background: no-repeat; } main.html file: Code: <!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>Main Page</title> <link href="../css/style.css" rel="stylesheet" type="text/css" /> </head> <body> <div class="pageholder"> <div class="outerbg"></div> <div class="innerbg"></div> <div class="footer"></div> </div> </body> </html> Here's a link to the site it's being hosted on (and not showing images for some reason). And this is an image of what it looks like in DW (also has the file structure on the right of the image):URL If anyone can point out where I'm going wrong, thank you - it's appreciated! Here's the issue... When the site loads, you'll see the h3 text for a second (on the right), then it gets covered up by the side boxes. I've tried using z-index for my h3 tags so they "hover" over the side boxes, but to no avail. Here's the link: http://www.infothreads.com/ Oddly, all the links show up above the side boxes, but not the h3 text. Any ideas? Thanks in advance. the page is http://www.mostardesigns.com/fmrehabv2/ as you can see in FF it shows up right but in IE the little menu splitters on the left menu are like 10px high instead of 2px for some reason, help! thanks in advance. I have recently begun training on CSS. I would say I am pretty skilled with the basics of creating a layout. I can pretty much do any layout, 3 column, 2 column, or whatever. The way I have been doing this is though is to specify the width using pixels of each <div> area. I have also been specifying the margins: and padding: using the exact pixels as well. I know this way does not cause the website to resize when I resize my browser. I also know that in order to cause it to resize I need to use %'s and such. Is there an advantage to this besides the obvious resizing ability. What do you guys all do? And is the best way to do a layout to use the <div> and then set up my scripts to display in the content <div> area each time? Thanks. Ok, so I'm having some problems getting my site to look how I want. The formatting appears correctly in all browsers (I think) but in IE it's horribly messed up. This is my first site that I'm making just to learn some things and I don't know much CSS at all. I've tried reading up but am not sure how to properly use CSS to make this work cross browser capable. Basically, I want my text box search bar properly centered along with my logo and the "advanced search" and "preferences" links. I painted over some stuff for privacy heh. In FireFox, it looks like this ( http://img261.imageshack.us/img261/9625/ex1hu0.jpg ) but in IE, it looks like this ( http://img523.imageshack.us/img523/4631/ex2sm7.jpg ). So basically in IE the search bar and what not is aligned too high! How can I use CSS to make it looks like it does in FireFox, in all browsers!? I learn best by example so thanks much for any help!!! My probably terrible code is as follows: Code: <table> <tr> <td valign="middle"> <a href="/home"><img src="logo.jpg"></a> </td> <td valign="middle"> <form id="SearchBarForm" action="search.php" method="get"> <input type="text" name="q" size="30" maxlength="150" value="'.($q).'" title="Search"> <select name="FTS"> <!-- FTS = File Type Selections --> <option value ="File_Type">File Type</option> </select> <font size=-1><input type="submit" name="Submit" value="Search"></form></font> </td> <td nowrap> <a href=/advanced_search.phpf>Advanced Search</a><br> <a href=/preferences.php>Preferences</a> </td> </tr> </table> Hey all, a few probs here. My new webpage coded with stylesheets: http://www.stocksbridgepentaqua.co.uk/test/index.php It looks good in IE and bad in FireFox (mozilla) its not a major problem because the ppl im targetting are using IE. Next, on this page: http://www.stocksbridgepentaqua.co..../index.php?id=9 I want a scroll bar in the actual window instead of it making the box massive. And another thing, how do I make a space between the bottom of the website and the bottom of the browser? Thanks. Jack. On the one hand Accessibility guidelines state that sites should work even if stylesheets fail to load... ... and then on another hand, you're told not to include any style/layout/formatting within an html page - to use the stylesheet instead. My question is this. Say i create a site which is arranged in the common layout of header at top, nav menu floated to the left, main content sitting on the right, and then footer below. Should the layout of the div's, namely the float left etc be within the webpage or the stylesheet. I guess most people will say stylesheet, but that means if the stylesheet fails to load, the site layout will be completely messed up with the content appearing below the nav menu. Do you make an exception in this case and include some limited layout-style information in the webpage? What are people's opinions on this? Hi Could someone assist me in making a print stylesheet for this site please! http://calibrehr.com/new/ What I need is: just the logo to display (remove nav) The text in the orange block to span the width of the page Remove subnav Some how diplsay the text that is in the purple boxes below the main content text I am stuck as to what to do and could really appreciate some help Many thanks! Hi people, I am completely new to programming and have only spent this weekend learning it! I have managed to create a decent website already, however i am stuck at a point. On my main page, i have attached a CSS stylesheet with all the formatting for my page. My problem however is that when i try to format one section (<div id="gallery">) the formatting messes with the rest of the page. Is there a way that i can assign a style sheet to only that <div id="gallery"> without it applying to the entire html page. Any help is greatly appreciated! Thanks Chris |