Results 1 to 6 of 6

Thread: Yet another ? on layout using CSS

  1. #1
    Join Date
    Dec 2002
    Pleasanton, CA

    Yet another ? on layout using CSS

    I'm new to CSS layout. I've used tables in the past so any comments on this simplified code would be appreciated.
    This faily simple CSS layout that works correctly in IE but falls apart in NS4xx. Is there a technique to keep the page ledgible in NS.
    Currently the footer div moves to the right and overlaps the other divisions.

    <html><head><title>CSS Layout</title>
    <style type=text/css>
    body { background:ffffff; margin:0px; }
    #header { text-align:center; width:100%; border:black 1px solid; }
    #leftdiv { float:left; width:200; height:300; border:black 1px solid; }
    #container1 { float:left; width:auto; border:red 1px solid; }
    #centerdiv { float:left; width:70%; height:200px; border:black 1px solid; }
    #rightdiv { float:right; width:30%; height:200px; border:black 1px solid; }
    #footer { float:left; width:100%; height:100px; border:black 1px solid; }
    <div id="header"><h3>header</h3><h1>CSS LAYOUT</h1>The layout needs to work for window widths of 800px and up</div>
    <div id="leftdiv"><h3>leftdiv</h3>FIXED width of 200px.</div>
    <div id="container1">
    <div id="centerdiv"><h3>centerdiv</h3></div>
    <div id="rightdiv"><h3>rightdiv</h3></div>
    <div id="footer"><h3>footer</h3></div>

  2. #2
    Join Date
    Dec 2002
    High on life
    I've had the same problem with NN4.x but with < 1% using 4.x I decided that if they want to view my site, they will just have to upgrade to a browser built this century...

    Personal website http://www.ryanbrill.com/
    Business website: http://www.infinitywebdesign.com/
    TypeSpace http://www.typespace.org/

    I reject your reality and substitute it with my own!

  3. #3
    Join Date
    Feb 2003
    Michigan, USA
    Gotta luv NS 4.x. There's a pretty simple work-around.

    First, you need two style sheets that are imported from .css files. One you import thru the old <link> tag:

    <link rel="stylesheet" type="text/css" href="legacy.css" />

    That you would place in the HEAD of the HTML document. Then erase all the styles you created inside the <style> tags, but keep the style tags. Just add this line of code, a complete example is below:

    <style type="text/css" media="screen">

    @import "default.css";


    Of course you can change the .css filenames to anything you want.

    This is where you place the styles for formatting the DIVs how you want them.

    Simply omit all of the position properties in default.css. The only thing that NS4 really supports correctly is text, font, some list, and some background properties in CSS. Here's how the trick works.

    Newer web browsers (IE 5.0 - 6.0 PC, IE 4.5 - 5 MAC, NS 6 - 7, Mozilla, Opera 5 - 7) recognize the @import method for importing an external style sheet. NS 4.x (the troublesome browser in question) and IE 4.0 for the PC and MAC do not recognize @import. But they do recognize importing external style sheets thru the LINK tag.

    Coincidently, fourth generation web browsers do not support enough of CSS 2 to correctly render the page as you want it. So what you've just done is "hide" the advanced CSS layout from mostly incompatible browsers.

    If you're interested in xhtml and CSS layouts, check out http://www.alistapart.com/. It's geared to those who already know CSS. It answers specific questions about xhtml and css layouts. For a complete reference for CSS, visit http://www.w3schools.com/.

    Hope this helps. And by the way, you will soon find that Internet Explorer will be the bain of your existence

  4. #4
    Join Date
    Dec 2002
    Pleasanton, CA
    Thank for your thoughts. I think it's finally time to abandon my beloved NS4xx (but not completely ).

    So I designed the page to work in NS4xx but without some of the fancy page formatting and bordered divisions. I hardcoded all the DIV absolute positioning on the HTML page and included all the floating DIV's. BUT the floating DIV styles are now included in an @import style sheet. ( toicontien )
    The page looks pretty fair in NS4xx and is what I want in IE.

    There is one problem. The last 2 chars 'd.' of the 'copyright' div are repeated below the this div. What did I do wrong?

  5. #5
    Join Date
    Dec 2002
    Pleasanton, CA

    Please help me understand what's going on.

    I messed with the code and found that by removing a comment. <!-- copyright -->, the 'repeated' chars went away.
    So, is the probem is solved? I think not! Something is happening that I do not understand.

    Please help!!

  6. #6
    celebguy_dv Guest

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.32946 seconds
  • Memory Usage 2,894KB
  • 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
  • (6)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (6)postbit
  • (5)postbit_onlinestatus
  • (6)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