Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Old 08-04-2007, 01:54 PM help with padding
Skilled Talker

Posts: 97
Trades: 0
i have a list that i want padded, but it also adds padding above the h3 which i dont want

HTML Code:
<div id="primary" class="sidebar">
<li id="pages" class="box">
                <h3>Pages</h3>

                <ul>
<li class="page_item"><a href="http://localhost/wordpress/index.php/about/" title="About">About</a></li>
<li class="page_item"><a href="http://localhost/wordpress/index.php/test/" title="test">test</a></li>
                </ul>
            </li>
        </div>
HTML Code:
div.sidebar div,div.sidebar h3,div.sidebar ul,div.sidebar li{margin:0;padding:0;}
div.sidebarinner{width:150px}
div.sidebar h3{font-size:1.2em;background-color:#2d2d2d;text-align:center;padding:3px 0 3px 0;}
div.sidebar input#s{width:7em;}
div.sidebar li{list-style:none;margin:0 0 1em;background-color:#404040;padding:5px 0 5px 0;}
div.sidebar li form{margin:0.2em 0 0;padding:0;}
div.sidebar ul ul{margin:0 0 0 1em;}
div.sidebar ul ul li{list-style: none;margin:0;}
div.sidebar ul ul ul{margin:0 0 0 0.5em;}
div.sidebar ul ul ul li{list-style-type: disc;}
div.sidebar .box{border:1px solid #202020;}
is there any way i can get rid of the padding above the h3
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
raptrex is offline
Reply With Quote
View Public Profile Visit raptrex's homepage!
 
 
Register now for full access!
Old 08-04-2007, 02:01 PM Re: help with padding
JamieLewis's Avatar
Pretty Much a Big Deal...

Latest Blog Post:
Gooie
Posts: 385
Name: Jamie Lewis
Location: UK
Trades: 0
Use the correct tags!!! Try using this HTML instead:

Code:
<div id="primary" class="sidebar">
<div id="pages" class="box">
                <h3>Pages</h3>

                <ul id="pagesList">
<li class="page_item"><a href="http://localhost/wordpress/index.php/about/" title="About">About</a></li>
<li class="page_item"><a href="http://localhost/wordpress/index.php/test/" title="test">test</a></li>
                </ul>
            </div>
        </div>

and for the CSS just use:

Code:
#pagesList{
padding: 3px;
}
Or however much padding you need
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Last edited by JamieLewis; 08-04-2007 at 02:59 PM.. Reason: Formatting
JamieLewis is offline
Reply With Quote
View Public Profile Visit JamieLewis's homepage!
 
Old 08-04-2007, 02:58 PM Re: help with padding
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Just one tiny adjustement; it's <ul id=; not <ul if=
Code:
<div id="primary" class="sidebar">
<div id="pages" class="box">
                <h3>Pages</h3>

                <ul id="pagesList">
<li class="page_item"><a href="http://localhost/wordpress/index.php/about/" title="About">About</a></li>
<li class="page_item"><a href="http://localhost/wordpress/index.php/test/" title="test">test</a></li>
                </ul>
            </div>
        </div>


__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 08-04-2007, 02:59 PM Re: help with padding
JamieLewis's Avatar
Pretty Much a Big Deal...

Latest Blog Post:
Gooie
Posts: 385
Name: Jamie Lewis
Location: UK
Trades: 0
So it is, nice spot. I really am no good at proof reading.

Jamie
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
JamieLewis is offline
Reply With Quote
View Public Profile Visit JamieLewis's homepage!
 
Old 08-04-2007, 03:13 PM Re: help with padding
Skilled Talker

Posts: 97
Trades: 0
thx guys it works!
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
raptrex is offline
Reply With Quote
View Public Profile Visit raptrex's homepage!
 
Reply     « Reply to help with padding
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.24600 seconds with 12 queries