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 8 of 8
  1. #1
    Regular Coder
    Join Date
    Dec 2009
    Posts
    240
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Can I Create some padding around this text? If so which part do I add to it??

    Alright guys

    I am wondering is it possible to add some padding to the main text in the left and right columns?? See here http://www.supreme-host.com/marketplace/marketplace.php

    Orginally there was padding for the whole box, which affected the header part as well.. But I have removed that.. Now I would like to be able to place the text away from the edges of the columns..

    Do I have to add another css class? Or can I just add padding to a section?

  • #2
    New Coder
    Join Date
    Nov 2009
    Location
    Portland Oregon
    Posts
    33
    Thanks
    0
    Thanked 6 Times in 6 Posts
    This worked for me...

    Code:
    .middlebox {
    
        background: #FFFFFF;
    
        float: left;
    
        width: 538px;
    
        margin: 10px 5px 10px 5px;
    
        padding: 0px 10px 0px 10px;
    
        display: inline;
    
        border: 1px solid #C0C0C0;
    
        }

  • #3
    New Coder
    Join Date
    May 2009
    Posts
    55
    Thanks
    1
    Thanked 4 Times in 4 Posts
    Check this on detailed css explanation about padding :

    http://www.w3schools.com/css/css_padding.asp

  • #4
    Regular Coder
    Join Date
    Dec 2009
    Posts
    240
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by hthought View Post
    Check this on detailed css explanation about padding :

    http://www.w3schools.com/css/css_padding.asp
    How about helping me instead

  • #5
    Regular Coder
    Join Date
    Dec 2009
    Posts
    240
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by dougnbr View Post
    This worked for me...

    Code:
    .middlebox {
    
        background: #FFFFFF;
    
        float: left;
    
        width: 538px;
    
        margin: 10px 5px 10px 5px;
    
        padding: 0px 10px 0px 10px;
    
        display: inline;
    
        border: 1px solid #C0C0C0;
    
        }

    dougnbr

    You have actually done it for the wrong box.. You have done it for the middle box. Not the two side columns.. If I add the padding to the leftbox, and rightbox as you have shown above, the whole box gets padded, the header, and image...

    I just want the text where it says Newest products to be padded...

  • #6
    Regular Coder
    Join Date
    Nov 2008
    Posts
    175
    Thanks
    4
    Thanked 6 Times in 6 Posts
    You would have to create a new class if you don't want it to do it for everything

    HTML:
    Code:
    <div class="leftbox">
    <div class="menu"
    h2 align="center">NAVIGATION</h2>
    - Newest Products
    </div>
    </div>
    CSS:
    Code:
    .menu {
    padding: 0px 10px 0px 10px;
    }

  • #7
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    Quote Originally Posted by Byronwells View Post
    How about helping me instead
    Teach a man to fish...
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting

  • #8
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,671
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello Byronwells,
    It may be time to start fixing some problems, before you get much further along in development.
    Have a look at your 152 errors
    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


  •  

    Posting Permissions

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