Jump to content

TheFilmGod

Members
  • Posts

    1,941
  • Joined

  • Last visited

    Never

Everything posted by TheFilmGod

  1. Hi, i am having trouble trying to center a table. Here is the html and css code: [code] <div id="maintable"> <table> <tr> <td> No of visitors: </td> <td> <?php include( "./counter/counter.php" ); ?> </td> </tr> </table> </div> CSS code : #maintable { text-align:center; } #maintable table { width: SPECIFY ABSOLUTE WIDTH px; margin: 0 auto; } I edited the code for you. To center the table you must specify an abosolute width and then margin: 0 auto; it. If you want to center the contents of the table then you can use text-align: center; for text and if you want to center images and other block elements, you'll need to use some advanced css. I hope this works for you!
  2. Css 2.0 enables you to specify a specific stylesheet for printing! Use this to your advantage. You can change the entire look and contents of your page with some creative use of this stylesheet alternative! I recommend reading about the print media for stylesheets on google.com
  3. Floating a div works just as well. I discourage using the <nobr> tag. Is there a css alternate, or could you floating the div to achieve the same look?
  4. <div id="expand"> <div class="middle"><div class="inner"> Contents! </div></div> </div> * Modern Browsers, not IE7 */ html>/**/body #expand { position:fixed; top:0; left:0; width: 100%; height: 100%; } html>/**/body #expand .middle { display:table; margin: 0 auto; height: 100%; } html>/**/body #expand .inner { vertical-align:middle; display:table-cell; } /* Only IE7 */ *:first-child+html #expand { position: fixed; top: 0; left: 0; width: 100%; height: 100%; } *:first-child+html #expand .middle { position:absolute; top:50%; left: 50%; } *:first-child+html #expand .inner { position:relative; top:-50%; left:-50%; } *:first-child+html #expand .main { margin: -3px 0 0 0; } Css hacks are necessary for IE7. Conditional stylesheets will not work as a subsitute. I have tried it before, but for some reason IE7 conditional stylesheets trigger an unkown bug that causes height: auto; to be inherited, thus creating issues. :-\
  5. This is div soup! body { width: 100%; } #html_page { width: 1000px; margin: 0 auto; } <body> <div id="html_page"> Contents should be centered! </div> </body>
  6. <label for="username">Username:</label> <input type="text" id="username" name="username" value="Default Values Goes Here" />
  7. Yes, the website needs to go live. The confirmation message only comes up if the validator can extract the file from a live server and read the file. The validator would have just extracted the file from your pc, but that would be a huge breach of security if it did that! I hope that clears things up.
  8. Your code is poorly designed. You may use tables for the row/columns section, HOWEVER it is not semantic to use tables for the kitchen utensils with the checks. Use an unordered list and float the <li> w/ css. And can you please explain to me why you have this in your code: <h2><img src="kitchensG.png" alt="Kitchens"></h2> . Search engines can not read images! Encosing an image within <h2> tags is uesless. Although the alt="" tag gives some significance, why not do this: <h2>Kitchens</h2> And then make the contents in <h2> invisible and then set the background to "kitchensG.png"? That would help!
  9. table { display: block; float: left; } Make sure you clear the floats at the end.
  10. I bring my laptop to school everyday. I still have their web tools filtering the content i can access on the internet - I use their free wifi. Can someone tell me how FTP port 80 is a security risk. I still don't understand!!!
  11. value="" - forgot = id or names shouldn't begin w/ # don't use <br /> use strictly css
  12. why are you enclosing the images within div tags. Simply float the actual images. The problem is obvious: your parent container is too small to contain both images side by side. Are you sure the images don't have an extra margin / padding?
  13. I recommend divs + tables. Tables should only be used for tabular data. You should strive to design SEMANTIC websites - use as few divs as possible to achieve the same design. A typically beginner will create div soup. For example: <div id="main"> <div class="heading">I am a heading in a div.</div> <div class="text">Text goes here... blah blah</div> <div class="image"><img src="../..images/something.png" width="50" height="50" alt="ALT text" /></div> </div> This is div soup. It isn't any better than tables! You should do this instead: <div id="main"> <h1>Heading Goes here!</h1> <p class="text">Text goes here... blah blah</p> <img src="../..images/something.png" width="50" height="50" alt="ALT text" /> </div> Remember, CSS is powerful enough that you can literally format these tags too! Actually, this technique will reduce your code since you don't have to specifiy classes, if you only use a tag once within a div parent. Finally, NEVER enclose text in only a div. This is terrible semantics. Always enclose it in a block level text tag. <li>, <p>, <h1>, etc.
  14. You can use multiple classes for one div or element. Separate classes by a space. Unfortunately, CSS has poor variable properties. You can't mix and match, or fuse properties into other classes.
  15. override the css style with an IE only stylesheet. The only other way around it is to use a bg image and repeat it x and y.
  16. Why not just say * { margin: 0; padding: 0; ... ... ... ... } Instead of listing all the elemnts seprately?
  17. background: url(/med.jpg) repeat-x;
  18. Instead of using a <label>, why don't you use a simple link? Would that work? What you are trying to do, is rather intriguing. Using hidden radio buttons, with labels as a way to select them is pretty smart. I have never heard of that, and I have read quite a few html books. Did you try validating your html? It is very possible that labels are not allowed to have images. But I might be incorrect. Validating is a good start in debugging the issue. What is your complete css code? Maybe I can help. Please explain clearly how you would want it to look like!
  19. <label id="label" for="000a052fIqk.jpg"> <img src="/include/avatar/1/000a052fIqk.jpg"/> </label> <label> is an inline tag. If you want it to display it similar to a div, you would need to make it display: block;. I never have nested images within labels. I might be wrong, but as far as know, labels should not have anything else in them other than text. Your image should have a specified width and height. I also recommend an alt tag. These are basics semantics.
  20. Sure. You can use frames - which is strongly discouraged. You can use ajax (js + php) to dynamically retrieve mome html files. Why do you need to do it through html? Php include() is simple enough.
  21. Since myspace is overriding your properties by a more specific stylesheet, I recommend using inline styles: <ul> <li style="list-style: none;"><a href="#">Link 1</a></li> <li style="list-style: none;"><a href="#">Link 2</a></li> <li style="list-style: none;"><a href="#">Link 3</a></li> </ul>
  22. #list ul li { list-style: none; } Use bubbasheeko's html. If that doesn't work, then I think another stylesheet is overriding your properties. Is there any documentation on that?
  23. Sure there's automatic copyright, but that doesn't mean you have fullproof legal protection. You should talk to an attorney if you really want to get a fullproof copyright. How many people here have actually enforced their copyright and seeked legal protection over their php code? - 0 people?
  24. IE6 has poor support for :hover. Are you using IE6 or IE7? ... Or maybe you're using IE8 beta?
  25. <div id="wrapper"> <img /><img /><img /> </div> #wrapper { overflow: auto; } #wrapper img { float: left; } That's all there's to it.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.