Hey all, Im new at this CSS but am getting there. One thing i would like to know is if you can hide an entire container with some simple code tweaks. Ive been using firebug for firefox to play around with it and all i could do was adjust the the sizes and colours and where its situated on the page. Ive added some pics to show exactly what it is and the code. Its just a warning page that users see before logging on, yet it doesnt need to be there. ok here are the pics
Quick way #adult-container { display:none; } though you should probably beat with a wet noodle whoever told you to use clearfix, much less slap it on EVERY damned element.
Thanks for that, will give it a go. Can i ask why you said clearfix is so bad? Im not judging your statement, i would like to learn why you dont like it.
also, just tried that code...nothing happend so stuck a ul in front of it and just the maroon sign went down leaving a grey screen. any idea what other code i could or should add? did you test the code on firebug?
That should work, and does work in firebug and under Opera. Where did you add it in the code? You put it in the external CSS, right? As to clearfix - it's a bunch of nonsense that adds a presentational class to the markup, for what TWO lines of CSS should be there to accomplish! None of the elements present under the outer div even NEED it, and the outer one could simply have overflow:hidden and a haslayout trigger on it instead of that clearfix bull. Clearfix was cute eight years ago, but we've since figured out haslayout and the proper behavior of CSS is better understood it serves no real purpose apart from markup bloat. Something plaguing that whole page... inlined CSS for no good reason (that doesn't even have valid targets), markup invalid for it's doctype, improperly 'formed' forms, non-semantic markup, improperly delimited keywords (there should be COMMA'S between them), too many keywords (pretty much ignored for abuse), keywords that don't match the page content (ignored for relevance), ID on elements that there is no reason to EVER put an ID on (HTML for example), HTML 3.2 style meta's in a XHTML doctype (caps are bad), Extra DIV around elements for no good reason.... meta's not recommended for use (rating for example)... etc, etc. Little reason for the code for that page to be much more than: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" ><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="description" content="Get on the Naughty Network and Discuss topics like Sexual health, sexuality, sports, Entertainment for adults and so much more." /> <meta name="revisit-after" content="15" /> <meta name="google-site-verification" content="BBMwvkGF5crlg5WxD20eQ5x51Ln_XpfwvKAQBUUjWM4" /> <link type="text/css" rel="stylesheet" href="screen.css" media="screen,projection,tv" /> <title> Dirtytube HQ - Australias Underground Network » Warning 18+ Only </title> </head><body> <form action="/action/" method="POST"> <div> <input type="hidden" name="rurl" id="rurl" value="Lw%3D%3D"> <img src="http://static.axcdn.net/icons/custom/warning.gif" alt="Warning" width="128" height="128" /> <h1> <strong>Warning!</strong> This network you're about to view may contain adult material. </h1> <p>Please do not enter if you're under 18 or easily offended.</p> <input type="hidden" name="hasagreed-adult" value="true"/> <input type="submit" value="Enter">Enter</input> </div> </form> <!--Google Analytics --> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-1878198-3"); pageTracker._trackPageview(); pageTracker._setDomainName("none"); pageTracker._setAllowLinker(true); pageTracker._initData(); } catch(err) {} </script> </body></html> Code (markup): Everything else being done easily being hooked off the CSS - though I'd not make a splash page of that nature without the site title and a brief text explaining what the site is, otherwise you're shooting yourself in the foot on SEO. Likewise, I'm not even sure I'd use a form since that submit is unlikely to be followed by any major search engine; therein a search engine will never even find your main page. My advice, lose the form, use an anchor. You want to pass values do it as $_GET, or set a cookie. though... by trying it, do you mean this: ul#main-navigation li#nav-events { display:none; } ul#main-navigation li#nav-members { display:none; } Code (markup): that's the part I was referring to having NO VALID targets. There's no point for that to even be IN the file.