CSS - Reset Css - Dumb Question
Hi guys
I've been trying the Eric Meyer's CSS Reset, and I think it is a good utility to add before starting a website http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ The thing is that I've started a new layout, tableless, and has 8 or 9 main divs. Now, when I put some text or news (with title) I can't make a title bold using html, with <b>, for example I have to define a css class for it, etc. And when I remove the css reset classes, I see everything with the html tags applied, etc. and the layout screws a little bit, so: 1. Would you really recommend css resets ? 2. How could I fix the code so it renders the "html styles" ? Hope you've understood my question Thanks, Similar TutorialsFirst of all, this is my first post, so take it easy on me if I do something wrong Onto the problem... I'm trying to center my CSS navigation menu. I'm probably making a completely moronic mistake, but I've been trying to figure this out for quite some time now to no avail. I've managed to ALMOST do it, but there's something wrong, and it's probably something minor. (Please excuse the sloppy coding; I'm just beginning to design the layout) HTML: Code: <div id="navigation"> <ul id="navigation"> <li><a href="page1.html" target="_self" title="Home" class="current">Home</a></li> <li><a href="about.html" target="_self" title="About">About</a></li> <li><a href="solutions/solutions.html" target="_self" title="Solutions">Solutions</a></li> <li><a href="clients/clients.html" target="_self" title="Clients">Clients</a></li> <li><a href="faq/faq.html" target="_self" title="FAQ">FAQ</a></li> <li><a href="contact/contact.html" target="_self" title="Contact">Contact</a></li> </ul></div> <!-- end #navigation --> CSS: Code: } .twoColLiqRtHdr #navigation { height: 37px; background: #FFF url("images/menu-bg-yellow-orig.gif") repeat-x; font-size: .9em; font-family: "Lucida Grande", Verdana, sans-serif; font-weight: bold; margin-left: 0; padding: 0; } #navigation ul, #navigation ul li { list-style: none; margin: 0; padding: 0; } .twoColLiqRtHdr #navigation ul { height: 37px; margin: 0; padding: 0; text-align: center; } .twoColLigRtHdr #navigation ul li { display: inline-block; } .twoColLiqRtHdr #navigation ul li a { color: #777; text-decoration: none; padding: 2px 10px 0px; height: 37px; line-height: 200%; margin: 0; display: inline-block; } .twoColLiqRtHdr #navigation ul li a:hover { color: #333; } .twoColLiqRtHdr #navigation ul li a.current { color: #CC0A00; background: #FFF url("images/current-bg-yellow.gif") repeat-x; padding: 2px 10px 0px; display: inline-block; } /*\*//*/ #navigation ul li a { display: inline-block; white-space: nowrap; width: 1px; } #navigation ul { padding-bottom: 0; margin-bottom: -1px; } /**/ /*\*/ html #navigation ul li a { padding: 0; } /**/ This is the result of my current coding: http://i75.photobucket.com/albums/i320/blockbusted/cssmenuproblem.jpg If anyone can shed some light on this problem of mine, I would greatly appreciate it! THANKS! (P.S. I know the CSS doesn't validate; I just validated it and I'm still having the same problem.) Hi there, I have reached the end of my ability to figure out fixes for my problem. I can see it must be something obvious that is creating my inconsistency across browsers, but I can't seem to figure it out. In IE all the items appear correctly but it is pushed over really far to the right and creates a scroll bar. It appears as I would like in Firefox. I would really appreciate some suggestions so I can get my cross-browser learning further along! my site: http://www.kohlrbaby.com/vcc/portfolio/portfolio.htm my css: body { margin: 0px 0px 30px 0px; padding: 0px 0px 0px 0px; font-family: verdana, arial, helvetica, sans-serif; color: #000000; background-color: #999999; text-align: center; } a { text-decoration: none; color: #43709e; outline: none; font-size: 12px; } a:visited { color: #990000; } a:active { color: #43709e; } a:hover { color: #e7d77e; text-decoration: underline; } a.nav { text-decoration: none; color: #000000; outline: none; font-size: 12px; } a.nav:visited { color: #0000000; } a.nav:active { color: #000000; } a.nav:hover { color: #990000; text-decoration: underline; } p { font-size: 12px; line-height: 22px; margin-top: 0px; margin-bottom: 0px; color: #000000; text-align: left; } .navText{ text-align: left; voice-family: "\"}\""; voice-family:inherit; width: 93px; } #title{ margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left:0px; position: absolute; } #navBox{ background-color: #CCCCCC; border-right: 1px dashed #000000; border-top: 1px dashed #000000; border-bottom: 1px dashed #000000; border-left: 1px dashed #000000; margin-top: -380px; margin-bottom: 0px; margin-right: 5px; margin-left:0px; position: relative; float: right; clear: right; padding: 10px 10px 10px 10px } #rightBox { border-right: 2px solid #666666; width:650px; height: 510px; border-top: 2px solid #666666; border-bottom: 2px solid #666666; border-left: 2px solid #666666; margin-top:60px; margin-bottom: 0px; margin-right: 0px; margin-left:200px; background: #ffffff; position: absolute; } #subTitle{ margin-top: 5px; margin-bottom: 0px; margin-right: 0px; margin-left:5px; float: left; clear: left; position: relative; } #drawing{ margin-top:0px; margin-bottom: 0px; margin-right: 0px; margin-left:0px; position: relative; } .mainPic { margin-top: 117px; margin-bottom: 0px; margin-right: 0px; margin-left: 150px; position:absolute; float: left; clear: left; } #smallPic { margin-top: -455px; margin-bottom: 0px; margin-right:-150px; margin-left: 0px; position:relative; } img.pic{ border-right: 1px solid #000000; border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; } Many, many thanks!!! Unfortunately I am going to have to get more involved in CSS rather than happily concentrating on PHP development. We have realised that getting our designers to CSS stuff is just costing us time as they lack the experience and don't understand the semantics. Anyway, as such I need to find out a few things I know but don't know if you know what I mean. Where can I find out the official definitions of CSS operators... * html for example..what the * does. class1>class2...what the > does...stuff like that. I have two CSS reset files. One by: Erik Meyer The other by: Yahoo! Inc. All rights reserved. Code licensed under the BSD License Which is better? I tried to put links to them, but the forum is prohibiting me, so if anyone is familiar, then advise. Hi all Is there a way to set a value, that has been overridden by a specific value before, to the browser's default value again? Code: div.specific { font-size: 10px; } div.specific div.browser_default { font-size: default; } Is there anything like that? Thanks for help, Josh http://www.testers.info/webdesign/viva/aktuelles/ Both boxes in the centre are placed inside a table cell and are positioned via a <div> Tag using "position:relative": Code: .parent { left: auto; top: auto; position: relative; } basically everything works fine but when you're using Internet Explorer and resize the page vertically (horizontally works fine) the boxes behave like they're positioned static. What declarations do I need to write in my style sheet to make the boxes stay in their table cell? P.S.: I already searched the web for about 2 hours on this topic. Hi all I'm using a reset.css file that sets the text-align for TDs to left. Now I'm using an old CMS that displays an admin bar on top of the page, which is so very old that it is based on tables and uses HTML styles like align="center" to align its content. Naturally, those styles are now overriden globally by the reset.css file. Is there a way to reset this style to "undefined" or something for this admin table, so the browser listens to the HTML styles like align="center" again? Thanks for help Josh Greetings all, Firstly, I am just now starting to use CSS instead of tabled layouts. I must say I am impressed by the power of CSS, but am still learning the ins-and-outs of it. I was wondering if there are any good references/books you'd suggest purchasing or looking at online? Now for my specific question. For my simple page project I am using to learn CSS, I have a <div> that denotes the header. This is supposed to simply have a small .jpg image on the left and some text on the right, like this: ___________________________ |[ i m a g e ]....................text | However, it comes out looking like this: ___________________________ |[ i m a g e ]..........................| |.....................................text| I suspect it is due to the align: right of the text, but am not sure how to correct it. Relevant snippets of code: testpage.html Code: ... <div class=header> <img src="image.jpg"><h1>TEXT</h1> </div> ... style.css Code: ... #header{ background-color: #FFF; border: 2px solid #666666; width: 860px; margin-left: auto; margin-right: auto; margin-top: 30px; margin-bottom: 0; } #header h1{ text-align: right; margin-right: 20px; font-style: italic; letter-spacing: 3px; } Thanks for any advice. Hi, I have three <div> Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> </HEAD> <BODY> <div id="container" style="width:500px;height:700px;background-color:green;"> <div id="one" style="float:left;width:100px;background-color:#ff9900; ">one<br>one<br>one<br>one<br>one<br>one<br>one<br></div> <div id="three" style="float:right;width:100px;background-color:red;">three </div> <div id="two" style="float:left;width:70%;background-color:#ff9988;">two jdfk hnldncf ddhf sd ohdnfc kbldhcv ohsvnskd hvjnsdhv hviopsdhv kbhopvd v onksdnv oln;sdmnv m;mv mnml;vm vm;klf kdfl'gl;v 'fg 'kdf'kvb'l ;'lfk</div> </div> </BODY> </HTML> I noticed when I increased the % width of my <div two> it goes below my <div three> I was under the impression it should just stay at the same level and text should wrap around my div three? But I guess that's not the case. Am I doing the something wrong or is this the expected behavior? I am currently working on a site: www.wirelessguy.net I am trying to get it so that when links are clicked, the pages load in the middle white section. I don't have the links made yet, but I've been messing with it with text only. I made the site template in a php file, then I include that file on all my pages that I create. How can I get pages to load in the middle section of the site? Anyone know why the <div>'s aren't displaying correctly in FF? View with IE if you want to see how it should look. http://www.cooperworkskilns.com CSS: http://www.cooperworkskilns.com/styles/layout.css I'm not sure is this question relating to css or javascript. Pls help. thanks alot Q1: What are the ways you can deal with x-browser issues? What are the pros and cons of each? Thanks, Gary Hi, I have the below css style that I am mostly using my pages, I have a standart anchor style. Anyway I want to attach "the other one" link with another style without touching the current style. How can I do this? Does CSS has a nested thing like c++? Thank you, Cem Code: <html> <head> <style type="text/css"> <!-- a:link {font-family:verdana,helvetica; font-weight: bold; font-size:11px; color: #0069b7; text-decoration: none;} a:active {font-family:verdana,helvetica; font-weight: bold; font-size:11px; color: #0069b7; text-decoration: none;} a:visited {font-family:verdana,helvetica; font-weight: bold; font-size:11px; color: #0069b7; text-decoration: none;} a:hover {font-family:verdana,helvetica; font-weight: bold; font-size:11px; color: #000000; text-decoration: none;} --> </style> </head> <body> <a href="http://url">First one</a><br> <a href="http://url2">The other one</a><br> </body> </html> how can i center a div in the center of a page, but within that div align every thing to the right. It seems simple but I can't get it to fly. Hi everyone. I was wondering if it was possible to create a link from already existing text on a page by reworking the styles in the cssstylesheet file? I'm currently editing around a shopping cart for a client but i was wondering if I could take a bit of a shortcut using css instead. Thanks for your time. Pablo If I have a link that I want to display in the center of a module that no matter what size a user chooses it stays centered..IE. via user config a user can make it 100px or 400px.. [module width] The question is how can I center a link and no matter what the user picks for a width as stated above the link stays centered? i am having a small issue with font size in browsers. i am using smarty template engine to create websites, i have originally created the html pages using css after slicing in photoshop. the pages look similar with respect to font sizes in all browsers when i integrate this html page into smarty i am using a copy of a template in smarty to create a website, so this copy also has a css file, i have commented most of the code in this css file which is in the smarty folder and i have used my css code which i initially created. the problem i am facing is with firefox only and all other browsers work fine only in firefox the text for h1, h2, p, ul li, a... etc are all appearing 1px smaller in size when compared to all other browsers i have tried using !important and inline styles however only firefox is displaying the text in the entire page 1px smaller compared to all other browsers which is not consistant. i have the following in the css file * { margin: 0; padding: 0; border: 0; } body { background: #ffffff; font: normal 12px Arial, Helvetica, sans-serif; margin: 0; padding: 0; } please advice. any help will be greatly appreciated. thanks. If you would be so kind as to visit www.footbagfreaks.com, you will see a sample site using css. On the main navigation, I am curious about something. What establishes the height of each nav element? They are all uniform. What I would like to do is this, which I hope I can explain. I would like to have a set dimension for each nav element, lets us just say each to be 30px high, by 150px wide. I would like to specify the area, 30 x 150 have a rectangular trans. gif as its background and the initial color of the bg would be the same as the trans. gif. On a mouseover, the bg color would change, and thus would show the the new color through the portion of the trans gif which is transparent. Basically, the same effect as on the logo on the top left of the page. If someone can help me with this, I'd appreciate it so much. OK .. I have 5 layers surrounding each one of my menu links .. the layer over-laps another layer with the main content in. Now if you look here you will see what i mean .... http://www.geocities.com/jezman2002/index.html You can see four of the layers but the top one i need to be black AFTER it crosses the line !!!! Do u see what i mean I just wondered if there was any easy way to do this ??? -Thanks- moved on.... |