CSS - Unknown Css Problem Newbie
As soon as I add this code for the rule, the apple on left side drops below the rule. It belongs in the upper left corner.
#body #rule { margin-top: 100px; align: center; spartaumc.com/contact_us2.html spartaumc.com/SpryAssets/sparta3.css Similar TutorialsHello, Ive been coding with CSS for about 2 weeks now. I have recently created this site and have tested it in IE and Firefox. Everything is fine but my Navigation. I have linked to a screenshot of the navs in each browser. Internet Explorer: http://panik.owphosting.com/nav1.jpg FireFox: http://panik.owphosting.com/nav2.jpg Here is my CSS: Code: img { border: 0px none; } body{ background-color: #ffffff; color: #000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; font-family: Verdana,sans-serif; font-size:10px } table { color: #000; padding: 0; margin:0; border: 0px none; font-size:11px } h1 { font-family: arial; font-size:18px } h2 { font-family: arial; font-size:16px } a:link { color: #000099; font-weight: bold; text-decoration: none; } a:visited { color: #000099; font-weight: bold; text-decoration: none; } a:active { color: #000099; font-weight: bold; text-decoration: none; } a:hover { color: #99cc33; } .cssnav{ width: 144px; height: 25px; padding: 0; margin: 0; } .cssnav a { width: 144px; height: 25px; color: #fff; background: #99cc33; border-right: 2px solid #d6f0a3; border-left: 2px solid #d6f0a3; padding-left: 5px; padding-top: 5px; margin-top: 1px; margin-bottom: 1px; } .cssnav a:visited { width: 144px; height: 25px; color: #fff; background: #99cc33; border-right: 2px solid #d6f0a3; border-left: 2px solid #d6f0a3; padding-left: 5px; padding-top: 5px; margin-top: 1px; margin-bottom: 1px; } .cssnav a:hover { width: 144px; height: 25px; color: #000; background: #d6f0a3; border-right: 2px solid #d6f0a3; border-left: 2px solid #d6f0a3; padding-left: 5px; padding-top: 5px; margin-top: 1px; margin-bottom: 1px; } table#sidebar { background: #99CC33; } table#thetable { } table#thetable td.sidebar2 { } .sidebar { background: #99CC33; border-right: 2px solid #000; } table#sidebar td.blockhead { background: #c5e586; color: #000; text-align: center; font-weight: bold; font-size: 10pt; } .footer { background: #FF9933; color: #000; text-align: center; font-size: 8pt; border-top: 2px solid #000; } .footer a{ color: #fff; } .footer a:visited{ color: #fff; } .footer a:hover{ color: #000; } .cat { color: #ff9933; font-size: 16px; font-weight: bold; } .lightgreen { background: #69A583; } .headbar { background: #FF9933; border-top: 2px solid #000; border-bottom: 2px solid #000; padding: 2px; text-align: right; } And Here is the code for the Dynamicly generated navigation (PHP): PHP Code: <TR> <TD> <div class="cssnav"><a href="index.php">Home</a></div> <?php $nav_query = "SELECT name FROM catagories ORDER BY id"; $nav_result = mysql_query($nav_query) or die ("Navigation Query Error"); $nav_numofrows = mysql_num_rows($nav_result); for($i = 0; $i < $nav_numofrows; $i++) { $nav_row = mysql_fetch_array($nav_result); echo '<div class="cssnav"><a href="catagory.php?id=' . $nav_row['name'] .'">' . $nav_row['name'] . '</a></div>'; } ?> <div class="cssnav"><a href="http://panik.owphosting.com/wkforum/index.php" target=_blank>Forum</a></div> </TD> </TR> thanks hi, just started with css and im having trouble centering 3 columns in a container. Code: <div id="container"> <div id="content"> <h1>Title Header</h1> <div id="top"> <div class="col"> <h2>Section Header</h2> <p>Lorem ipsum est cu voluptatum efficiantur deterruisset, nec et solum lucilius argumentum, eum ei regione bonorum suavitate. Lorem nonummy suscipiantur sit cu, id eum soluta putant. Sale porro rationibus mei no. Vis ut primis virtute nostrud, sea an malis menandri definiebas, his agam ancillae delectus ei. Ei deleniti noluisse interesset quo, vis at quem scriptorem cotidieque. Sit an virtute gubergren expetendis, at ludus dolor accusam per.</p> </div> <div class="col"> <h2>Section Header</h2> <p>Ferri docendi nec ut. Viris tamquam ad quo, nam admodum facilisis adolescens ut, usu meis iriure tractatos at. Ei duo eros qualisque elaboraret, paulo vivendo inciderint an duo, mea eius exerci constituam cu. Ne facer exerci appetere vis, id dicat malorum mel, an sed ferri ludus aliquyam. Ut omnis meliore praesent usu, te sit quas tempor moderatius, accusam voluptua eam at. Duo agam etiam facilisi eu, cum an aeque congue contentiones, id omnium persecuti sadipscing sit. Ne eum invidunt laboramus, eum error nostro ad.</p> </div> <div class="col"> <h2>Section Header</h2> <p>Quem feugiat adipisci no sed, simul solet mandamus ut sea, no vocent corrumpit argumentum per. Cu iisque facilisi insolens est, posse nonummy adipisci vel ut. An has nibh natum dissentias, te lorem legere posidonium eam, te quodsi prompta euripidis sed. Ne noluisse petentium cum, sed utroque offendit recteque eu. Te cum petentium disputando, id duo oratio fuisset gloriatur, in sed timeam ponderum.</p> </div> </div> <div class="clear"></div> </div> <div id="footer"> <h3>Footer Header</h3> </div> </div> css: Code: * { margin: 0; padding:0; border: 0; } body { background-color: gray; text-align:center; } #container { width: 900px; background-color:white; margin: auto; } #content { } #top { margin: auto; } .col { margin: auto; width: 267px; float: left; text-align: left; } .clear { clear: both; } #footer { clear: both; } this obviously doesnt work. and has some serious issues. if not, coded wrong altogether. im free to any suggestions as far as my div markups and what i should be doing to keep code efficient. i also am wondering what the keyword 'auto' mean in css. ive searched all around and never found a good exp or example explaining what it is. again, the css is pretty screwed. i added and deleted so much that i cant even remember what i did and getting a little frustrated in the process. thanks in advance for the response. Hi guys, I have a small problem which is driving me crazy. I have a main container with two containers inside named left and right. I want a border on the main container, but i do not know the height of the main container as this will depend on the content in 'left' and 'right'. So what should I set the height of the main container to? I've tried 100% but this does not work and if I omit the geight property the main container does not show up. Any ideas? Thanks in advance, Rob. I've been trying for almost a week now to sort out the problem in this coding but I just can't establish it I've tried removing the apostrophes from the id's, altering the ' marks into every possible variant I've been able to find, and I startedrebuilding it piecemeal but after the first 4 worked I copied it in in blocks of 3 and it then failed. I'm reserving the completely singular addition of each new field until after I've had someone who knows the language look at it and help. Really stuck My code is too long to post here so I've left it visible here webjam.com/thewarlords/help It works flawlessly with only the first 3. Even if I fill the entire table with them. It's only when I introduce the whole terms in bulk it fails. Is there an upper limit to the amount of fields allowed? Hey, I have been looking EVERYWHERE for a solution and there seems to be none just quite yet. I've searched google and all sorts of help forums... and still zip, nothing. What I want to do is vertically-align the text in this example: http://www.tri-m.com/test.html in the middle of the white space. The problem though is that there is an unknown height of the whitespace because I want it to be that no matter what size you size the window, the content will always be vertically aligned... so I'm pretty stuck on how to do this. I'm needing the solution for this desperatly and I have been searching and trying everything for weeks. If anyone could help that would be VERY VERY apperciated. Thank you sooo much to everyone that tries this out. Once again here is the Example: http://www.tri-m.com/test.html Here is my code: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Tri-M Systems INC.</title> <style type="text/css"> * { margin:0; padding:0; } html, body { height:100%; } body { color:#000; } #container-page { background:#fff; width:100%; min-height:100%; /* For Modern Browsers */ height:auto !important; /* For Modern Browsers */ height:100%; /* For IE */ position:relative; text-align:left; margin:0 auto; } #container-head { background:#fff; } #header { background-color:#0000FF; min-width:830px; width:expression(document.body.clientWidth < 832 ? "830px" : "auto" ); height:81px; position:relative; } #container-content { min-width:830px; width:expression(document.body.clientWidth < 832 ? "830px" : "auto" ); text-align:center; position:relative; padding: 0 0 162px 0; } #container-content:after { height:0; clear:both; display:block; content:"."; visibility:hidden; } #content-sec ul,#content-sec ul li { list-style: none none; } #container-foot { background-color:#ff0000; width:100%; min-width:830px; width:expression(document.body.clientWidth < 832 ? "830px" : "auto" ); height:162px; position:absolute; bottom:0 !important; bottom:-1px; /* For Certain IE widths */ } #foot { height:162px; } </style> </head> <body> <div id="container-page"> <div id="container-head"> <div id="header"> </div><!-- END "header" --> </div><!-- END "container-head" --> <div id="container-content"> <center> <div id="box">VERTICAL ALIGN THIS IN WHITE SPACE</div> <!-- END "box" --> </center> </div><!-- END "container-content" --> <div id="container-foot"> <div id="foot"> </div><!-- END "foot" --> </div><!-- END "container-foot" --> </div><!-- END "container-page" --> </body> </html> - Jacenta the contents of a div have an undetermined size, it varies. I need to vertically center it as well as horizontally, which I can do the latter of. I can't use padding or margins because I don't know the size. How do I do this? I am currently having to deal with a mystery padding at the bottom of each of my im_container tags... everything is set to 0px, and oddly enough... it looks GREAT in IE (ugghh... i can't believe i just said that)... it doesnt however look good in firefox... whats up... here is the XHTML followed by the CSS.. Code: <div class="im_left"> <div class="im_container"> <div class="im_logo"><img src="/images/im_icq.gif" alt="Contact Via ICQ" /></div> <div class="im_info"> 164149536 </div> <div class="clear"></div> </div> <div class="im_container"> <div class="im_logo"><img src="/images/im_aim.gif" alt="Contact Via AIM" /></div> <div class="im_info"> Incomplete Gamer </div> <div class="clear"></div> </div> </div> Code: .im_left {float:left; width:270px;} .im_container { margin:0 0 0 30px !important; border:1px solid #900; } .im_container a:link, .im_container a:visited, .im_container a:active, .im_container a:hover {color:#FFF;} .im_logo { margin:0px 0 0 0; float:left; width:30px; margin:0px; padding:0px; } .im_logo img {border:0px; margin:0px; padding:0px;} .im_info { font-size:12px; font-family:Verdana, Arial, Helvetica, sans-serif; margin:0 0 0 5px; text-align:justify; width:200px; float:left; } .im_title { text-align:center; font-weight:bold; } Hi, I want to display some products on a web page. Anyone know how I can display the products (image & text) in a nice looking box? Thanks CF Hey folks, I have a question. I'm trying to get a site 100% CSS compliant through W3C. But I'm facing a few problems. Of course I had the site looking just the way I like it (but then had to change stuff to make it compliant and thats when the fun begins!). I was wondering if you could have a look and see why this panel isn't floating to the right like I have told it to! three60design.com/sky_site/home.htm This is my first full CSS website and want it to be just perfect for going for jobs and would REALLY REALLY appreciate any help..... Gerry HELP !! The header to my website is designed in css with <div> tags and some times the whole background does not load....any thoughts? Also I am considering the possibility that my header should not call to my stlye.css file, but that the header should be a table with the table having it own style...any thoughts on this would be really appreciated thank you sean (URL address blocked: See forum rules) is my site So I'm taking the jump from Tables to Div layouts for non-record elements like I'm "supposed" to. Just for starters, I'm finding it much more complicated than tables would have ever been, and there are a number of cross-browser problems that would have never happened, but I won't get into a rant about it here. So, instead, a simple question. I have some nested Divs I'm setting up like I would a nested table. But I'm finding that some DIVs are actually "poking out" of the original DIV. I didn't even know this was possible w/o some sort of positioning. Can anyone tell me what I'm doing wrong he http://www.poweredpages.com/cityrecovery/index.php I'm trying to keep that red bar inside the top DIV, which contains a gray background (and a red border to help you see where the outermost DIV lies). Thanks, Jeremy Hello, i am creating a website in dreamweaver and have created a custom css navigation bar online. can anyone help me get the navigation bar on to my dreamweaver website? i have the css files and everything for the navigation bar i just can't work out how to insert it into my design. please help as i have a deadline looming :/ thanks for your time sam marriott I'm a design student trying to make an online portfolio and honestly I don't know much about CSS and I've hit a bit of a snag. I've been goofing around in Dreamweaver trying to get the CSS containers to do what I want but I just can't seem to get it. URL Basically, I'd like a two columns both aligned at the bottom of the browser. The right column would be centered and the left column would be aligned to the left of it. The left column would be a menu column and would be fixed and shouldn't scroll. Here's the CSS code: Please don't laugh Code: .container { height: 80%; width: 700px; margin-left: auto; margin-right: auto; background-color:#06F; padding: 10px; position: relative; overflow: visible; bottom: 0pc; } .menu { height: 80%; width: 300px; padding-top: 25px; padding-right: 25px; position: fixed; left: auto; bottom: 0px; background-color: #F00; } Sorry for being such a newbie, the code is nothing like what I wanted. If someone could please lend me a hand, I would gladly appreciate it I need to build web page like this. Is it possible to make it with divs. I believe it is, but I can't manage how. Can you please help me with my little problem? Thanks in advance! I have a b2 evolution blog that I'd like to alter a bit. I'd like to be able to widen the area where the content is displayed so there isn't so much wasted space on each side. How would I go about doing this? If you need to see the site: http://www.foreverpurple.com/blog/crab_blog.php Hey, i created this page using tables www.epcgaming.com/rev and obviously its very messy code, and doesnt load well. I had suggestions that i should do it in css, i read some tutorials, but i still do not see how i can make that layout using css and not tables, you guys got any tips to get me off inthe right direction? |