Results 1 to 7 of 7

Thread: Using CSS to make a table based site

  1. #1
    Join Date
    Jan 2003

    Using CSS to make a table based site

    Okay, I already posted about my site on the General forum, but I have a new question which is more suited for here. Everyone on my General thread commented on how my HTML could be improved greatly by using CSS. The page was basically 3 tables, all on top of each other on the left margin. I asked how to get the bottom table to the middle top, I basically wanted it to a "news" section. They gave me some code, and it worked, sort of. Here is a link to my current page: http://www.geocities.com/darthraid//index.htm if you need the source you can just view it.

    I want to use CSS, as it seems easier, but I can't seem to duplicate the way my tables look. Can table properties be put into CSS? Or do I need to define all the table properties within <table></table> code? If anyone can explain that would be great, and actual working code would even be better. I don't know a ton about HTML, but here is a site my friend made, which I was basically trying to reverse engineer to understand how to do it myself: http://www.apocalypseguild.com/ If that can be replicated exactly w/ CSS, that is what I need to know. Thanks.


  2. #2
    Join Date
    Dec 2002
    it's better to make one parent table like:

    <table border="0" width="100%">
    <td width=25%>your leftside tables within</td>
    <td width=50%>your middle tables within</td>
    <td width=25%>your rightside tables within</td>

    and that works on every browser


  3. #3
    Join Date
    Nov 2002
    Boy that was fun. Alright, beating a dead horse, click on both links in my signature. One is to find out what a Doctype is, and what it's used for. The other one is so you can validate your code before posting it. I know Geocities is going to make your code invalid, but as long as you can make sure your stuff is valid, that's all we can hope for at this point. I would suggest that you do add a Doctype to your code, and then validate your copy to just get a feel of validating. Don't just take my code and run with it.

    I went and did a complete recode validating against XHTML 1.1 for my own pratice. The only quirk that I couldn't figure out off hand was when I shifted some of your text to the right the background color only covered the area where the text was at. If I just left it normal, the background color filled the whole div tag. If any CSS guru has any ideas, I'm all ears. It's the subHeader class for those wondering.

    Also note that if you cut out the styles code and then copy it, without the style tags, into a file that's saved with a .css extension, you allow yourself to have those stlyes be added to a page automatically as long as you have the CSS file and your page in the same directory. If you put a page in a sub folder than you just need to change the href in the link tag that points to the CSS file to ../styles.css instead of styles.css. External style sheets, it's a beautiful thing.

    Since you probably don't have a clue as to what most of the CSS does, play around with it until you get a better understanding.

    Anyway, here's the code.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <title>Brandon is a nub at webpages</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Script-Type" content="text/javascript" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <link rel="stylesheet" title="Default" media="screen" href="styles.css" type="text/css" />
    <style type="text/css">
    body { font-size:10px; font-family: Verdana, Arial, sans, sans-serif; background-color:#3366FF; margin-left:0px; margin-top:0px; margin-right:0px; }
    .boxOne { border:1px solid #000000; width:20%; margin-bottom:15px; }
    .boxTwo { border:1px solid #000000; width:20%; }
    .header { color:#FFFFFF; background-color:#3333FF; padding:3px; border-bottom:1px solid #000000; }
    .info { color:#B7B7B7; padding-bottom:5px: }
    .news { position:absolute; top:129px; left:22%; border:1px solid #000000; width:70%; }
    .subHeader { color:#FFFFFF; background-color:#656565; padding:3px; border-bottom:1px solid #000000; }
    .textArea { padding:3px; }
    .title { color:#FFFFFF; text-decoration:underline; font-weight:bold; }
    <img src="suxpageweb.jpg" width="780px" height="128px" alt="I suck at the webpage" />
    <div class="boxOne">
    <div class="header">:: Your page rules ::..</div>
    <div class="subHeader">Mine Sux</div>
    <div class="textArea">
    <div class="title">Next Battle</div>
    <div class="info">Jan 12 2003 [Sat]</div><br />
    <div class="title">Time [est.]</div>
    <div class="info">7:00pm</div><br />
    <div class="title">Versus</div>
    <div class="info">Strike Force / Death Knights</div><br />
    <div class="title">Practice Time</div>
    <div class="info">1 hour before match</div>
    <div class="boxTwo">
    <div class="header">:: It will take ::..</div>
    <div class="subHeader">A while to learn this</div>
    <div class="textArea">
    <div class="title">Next Battle</div>
    <div class="info">Jan 12 2003 [Sat]</div><br />
    <div class="title">Time [est.]</div>
    <div class="info">7:00pm</div><br />
    <div class="title">Versus</div>
    <div class="info">Strike Force / Death Knights</div><br />
    <div class="title">Practice Time</div>
    <div class="info">1 hour before match</div>
    <div class="news">
    <div class="header">:: News ::..</div>
    <div class="subHeader">AP|Events|</div>
    <div class="textArea">
    <div class="title">Next Battle</div>
    <div class="info">Jan 12 2003 [Sat]</div><br />
    <div class="title">Time [est.]</div>
    <div class="info">7:00pm</div><br />
    <div class="title">Versus</div>
    <div class="info">Strike Force / Death Knights</div><br />
    <div class="title">Practice Time</div>
    <div class="info">1 hour before match</div>

  4. #4
    Join Date
    Nov 2002
    Hmm, this is odd. The right border on the news section is missing in Mozilla 1.2.1, but it's there for IE 5.5 and 6.0 and Netscape 7.0. This also only starts to happen when I view it at 1400X1050. Smaller resolutions are fine. I'll mark it up to a bug in Mozilla. They are testing version 1.3 for Mozilla, so it might just go away. The bug that is. :-) I'll download the test version and see if they caught it yet.

    The real reason I ment to post was to add how I did change some of your code to be more cross browser friendly.

    If you want to learn more about using CSS with tables, pick up Eric Meyers on CSS. I only use tables when I actually want to create a tabel of info.
    Last edited by spufi; 01-11-2003 at 12:41 AM.

  5. #5
    Join Date
    Jan 2003
    Awesome man. I looks great. I just put it up and it looks almost perfect. I haven't had time to really pick through it yet and see how changes affect it etc but, I have this to say. On my original, the tables, which have now been replaced w/ CSS had a beveled/embossed edge to them. They looked like they had some depth/raised edges. How would I do that throught he use of CSS?


  6. #6
    Join Date
    Nov 2002
    That's info which doesn't fall into the stuff I know by heart. I would have to look it up to see. It didn't look like it was showing up in Mozilla with your original code so I was wondering if it was more of a IE thing. I think IE does more with the border colors for tables. Since I was trying to just get it done, that was one shortcut I took. Plus, I tend to skip browser specific stuff as much as possible.

  7. #7
    Join Date
    Jan 2003
    Okay cool. I used the outset and inset commands, they are similar but not quite the effect I want. I'm sure there is a way to do it, but I just don't know how. I basically want my boxes to look like this: http://www.apocalypseguild.com/ Still messing with it.


    I got a new problem, how do I get that box in the middle to sit under the news box: http://www.geocities.com/darthraid/
    Last edited by darthraid; 01-11-2003 at 02:53 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.15430 seconds
  • Memory Usage 2,907KB
  • Queries Executed 13 (?)
More Information
Template Usage (32):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (7)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (70):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates