Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Aug 2009
    Posts
    40
    Thanks
    3
    Thanked 0 Times in 0 Posts

    body scroll tag help

    So how do i take the
    Code:
    <body scroll="no">
    tag and make it so its in CSS?

    I have this tag on my site but W3C is demanding that it gets fixed. My site is in HTML 4.01 Loose with a encoding of utf-8

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,695
    Thanks
    22
    Thanked 1,832 Times in 1,816 Posts
    Hello FrickenTrevor,
    put something like this in your CSS -
    Code:
    body {
    	overflow: hidden;
    }
    That will give stop any scrollbar from appearing. It will also hide any content that needed a scrollbar, like if someone were to view your site on a cellphone or something.
    See the w3schools page on overflow - http://www.w3schools.com/Css/pr_pos_overflow.asp
    Last edited by Excavator; 12-29-2009 at 05:11 AM.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    New Coder
    Join Date
    Aug 2009
    Posts
    40
    Thanks
    3
    Thanked 0 Times in 0 Posts
    The code didnt work
    Last edited by FrickenTrevor; 12-29-2009 at 05:16 AM.

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,695
    Thanks
    22
    Thanked 1,832 Times in 1,816 Posts
    Where did you put it?
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #5
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,372
    Thanks
    32
    Thanked 286 Times in 280 Posts
    Quote Originally Posted by FrickenTrevor View Post
    So how do i take the
    Code:
    <body scroll="no">
    tag and make it so its in CSS?
    You could use <body style="overflow: hidden;">. I would recommend taking Excavator's approach and using an embedded or external style sheet with selectors to apply this CSS though.

    Quote Originally Posted by FrickenTrevor View Post
    I have this tag on my site but W3C is demanding that it gets fixed. My site is in HTML 4.01 Loose with a encoding of utf-8
    I believe the correct name is HTML 4.01 Transitional. (The DTD file is named "loose.dtd" though.)
    For every complex problem, there is an answer that is clear, simple, and wrong.


  •  

    Posting Permissions

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