Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
  1. #1
    Member Arjun's Avatar
    Join Date
    Feb 2004
    Location
    Omro, WI
    Posts
    46
    Member #
    4866
    I have some questions, most dealing with CSS.

    1.Can I make a div a certain set sized box with a scroll bar inside of it? If so, how? I want a box for news blogs but I dont want it to take up a lot of space.

    2.How do I set a CSS div to be horizontally centered?

    3.How do you set a CSS div to be transparent

    4. and How do you change the color of the scroll bar to the right of the browser window.

    Thanks much,
    Arjun
    Talk low, talk slow, and don't talk too much.
    John Wayne

  2.  

  3. #2
    Senior Member justlivyalife's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham, UK
    Posts
    2,871
    Member #
    2374
    4. You can change it by inserting the following code into your <style> tags, in your <HEAD> tag.

    Code:
    <head>
    <style type="text/css"> 
    body { 
    scrollbar-arrow-color: #0066CC; 
    scrollbar-3dlight-color: #FF00FF; 
    scrollbar-highlight-color: #FF00FF; 
    scrollbar-face-color: #6600CC; 
    scrollbar-shadow-color: #FF00FF; 
    scrollbar-darkshadow-color: #FF00FF; 
    scrollbar-track-color: #66CC00; 
    } 
    </style>
    </head>
    justlivyalife - The future depends on what we do in the present. (Mahatma Gandhi)
    WDF Resources: WDF Rules
    Non-WDF: JavascriptSource | Dynamic Drive | phpBB | HTML-Kit | Winamp | Download Firefox | Morguefile

  4. #3
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    1. in the id/class for the div add the following:
    Code:
    .class{
    width:50px;
    height:50px;
    overflow:scroll;
    }
    2.Add in <div align="center">

    3. In the CSS add in:
    Code:
    .class{
    visability:none;
    }
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  5. #4
    Member Arjun's Avatar
    Join Date
    Feb 2004
    Location
    Omro, WI
    Posts
    46
    Member #
    4866
    <div align="center"> centers the text in the div but not the div itself.
    Talk low, talk slow, and don't talk too much.
    John Wayne

  6. #5
    Member Arjun's Avatar
    Join Date
    Feb 2004
    Location
    Omro, WI
    Posts
    46
    Member #
    4866
    using the overflow gives me a box with scroll, as I wanted, but it gives me horizontal scroll also - how can i get rid of the h scroll?
    Talk low, talk slow, and don't talk too much.
    John Wayne

  7. #6
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    Originally posted by Arjun
    <div align="center"> centers the text in the div but not the div itself.
    the reason the div itself is not centered it's 'cause there's no space to center it?!

    kinda like the same way if you had a page that was 700px wide and you where trying to center a 700px wide table... got it?

    try adding a width of 100%.
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  8. #7
    Member Arjun's Avatar
    Join Date
    Feb 2004
    Location
    Omro, WI
    Posts
    46
    Member #
    4866
    Originally posted by karinne
    got it?

    try adding a width of 100%.
    Not really, and I dont want the div to be 100% of the page. I want the main section to only be like 700px wide - so are you saying to create that div inside another div/table and then centering it like that will work?
    Talk low, talk slow, and don't talk too much.
    John Wayne

  9. #8
    Member Arjun's Avatar
    Join Date
    Feb 2004
    Location
    Omro, WI
    Posts
    46
    Member #
    4866
    Code:
    #main {
    	width:100%;
    	height:100%;
    	}
    	
    	
    #body {
    	position:absolute;
    	visability:none;
    	width:700px;
    	height:100%;
    	border-style:solid;
    	border-color:black;
    	border-width:0px 1px 0px 1px;
    	background-color:white;
    	padding:5px;
    	text indent:5px;
    	voice-family: "\"}\"";
    	voice-family:inherit;
    	width:700px;
    	}
    This is the stylesheet code I have. The body div is inside of the main div, and i have the main dic at align="center" in the html, but it pushes the body div way over to the right of page, so far that to see all of it you have to scroll horizontally. Any help?
    Talk low, talk slow, and don't talk too much.
    John Wayne

  10. #9
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    if you just want to center your whole page this link might help -http://www.thenoodleincident.com/tutorials/box_lesson/basic_centered.html
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  11. #10
    Member Arjun's Avatar
    Join Date
    Feb 2004
    Location
    Omro, WI
    Posts
    46
    Member #
    4866
    Thank you, the hack on that site worked, though its making a few problems for other things. Im trying to work it out.

    Anyone know how i can get rid of the horizontal scroll on a div that has scroll overflow?
    Talk low, talk slow, and don't talk too much.
    John Wayne


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:17 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com