SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict
    Join Date
    Aug 2005
    Location
    Belgium
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    applying padding to div, inside a div (important for layout)

    hey
    i want a to aply a padding to all my content boxes.
    So i puted in each of the layout's columns, another div, whit class="inside"
    .inside {
    padding-left: 10px !important;
    }
    but it doesn't work
    now, myabe somone will sugest, to di like p { padding:10px } but this is impossible in my case becues the tempalte is for a cms, that uses 1000's of tags v_v

    so any sugestions ?
    thanks

  2. #2
    Non-Member
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    4,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello

    seems to work ?

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <title>12345 12345 12345 12345 12345</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    	<style type="text/css">
    	.x{width:400px;background:#ffffcc;}
    	.inside {padding-left:10px;}
    	</style>
    	<script type="text/javascript">
    
    	</script>
    </head>
    <body>
    <div class="x">
    <div class="inside">
    inside<br />
    inside<br />
    inside<br />
    inside<br />
    inside<br />
    inside<br />
    inside<br />
    inside<br />
    </div>
    <div class="inside">
    inside<br />
    inside<br />
    inside<br />
    inside<br />
    inside<br />
    inside<br />
    inside<br />
    inside<br />
    </div>
    </div>
    
    </body>
    </html>

  3. #3
    SitePoint Addict
    Join Date
    Aug 2005
    Location
    Belgium
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yea, it should work, but it doesn't :'(

  4. #4
    Non-Member
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    4,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello

    make it stronger

    .inside {padding-left:10px;}
    .x .inside {padding-left:10px;}
    .wrapper .x .inside {padding-left:10px;}
    html .wrapper .x .inside {padding-left:10px;}

    leave out and test if div has a padding left
    .inside {padding-left:10px;}

  5. #5
    SitePoint Addict
    Join Date
    Aug 2005
    Location
    Belgium
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nop, that didnt work neether.
    But maybe i had made a mistake (even if i checked about 10 times v_v ) because i mad another class, with same style, and that did work

  6. #6
    Non-Member
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    4,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello

    maybe a link to the problem Page ?

  7. #7
    SitePoint Addict
    Join Date
    Aug 2005
    Location
    Belgium
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it's solved, i just needd to change the class'es name


Bookmarks

Posting Permissions

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