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 03-29-2011, 04:10 AM border in <li>
asmalik12's Avatar
Extreme Talker

Posts: 173
Name: Abdullah Saleem
Trades: 0
Hi,

How can I use border-bottom under the full <li> rather than just the text [Some text here...] here?

Code:
<style type="text/css">
ul.latest {
	list-style-type: none;
        margin: 0px;
	padding: 0px 0px 5px 10px;
	}
	
ul.latest li.latestlist {
        font-weight:bold;
        text-align:center
        margin: 0px 0px 5px 1px;
        padding: 3px 0px 5px 3px;
	}

ul.latest li.latestlist a, a:visited {
        font-weight:bold;
        border-bottom: 1px dotted #000000;
        clear: both;
        padding: 3px 0px px 15px;
        text-align:center
        color: #1c1c1c;
	}

ul.latest li.latestlist a:hover {
        text-align:center
	color: #000000;
	text-decoration: underline;

	}
</style>
HTML Code:
<div style="background: #ffffff;
            border: 1px solid #C8C8C8;
            -moz-border-radius: 0px 0px 8px 8px;
            -webkit-border-radius: 0px 0px 8px 8px;
            -khtml-border-radius: 0px 0px 8px 8px;
            border-radius: 0px 0px 8px 8px;">

<ul class="latest">

<li class="latestlist"><a href="#">Some text here....</a></li>
<li class="latestlist"><a href="#">Some text here....</a></li>
<li class="latestlist"><a href="#">Some text here....</a></li>
<li class="latestlist"><a href="#">Some text here....</a></li>
<li class="latestlist"><a href="#">Some text here....</a></li>


</ul>

</div>
__________________
"Think 100 times before you take a decision, But once that decision is taken, stand by it as one man." - Quaid-e-Azam

Last edited by asmalik12; 03-29-2011 at 04:11 AM..
asmalik12 is offline
Reply With Quote
View Public Profile Visit asmalik12's homepage!
 
 
Register now for full access!
Old 03-29-2011, 04:18 AM Re: border in <li>
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,376
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
apply the border rules to the <li> rather than to the child <a>nchor elements.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-29-2011, 04:35 AM Re: border in <li>
asmalik12's Avatar
Extreme Talker

Posts: 173
Name: Abdullah Saleem
Trades: 0
Thnx. Now, how to get bottom-border centered?

Code:
<style>
ul.latest {
	list-style-type: none;
        margin: 0px;
	padding: 0px 0px 5px 10px;
	}
	
ul.latest li.latestlist {
        font-weight:bold;
        text-align:center
        margin: 0px 0px 5px 0px;
        padding: 3px 0px 5px 3px;
        border-bottom: 1px dotted #000000;
	}

ul.latest li.latestlist a, a:visited {
        font-weight:bold;
        
        clear: both;
        padding: 3px 0px px 15px;
        text-align:center
        color: #1c1c1c;
	}

ul.latest li.latestlist a:hover {
        text-align:center
	color: #000000;
	text-decoration: underline;

	}
</style>
__________________
"Think 100 times before you take a decision, But once that decision is taken, stand by it as one man." - Quaid-e-Azam
asmalik12 is offline
Reply With Quote
View Public Profile Visit asmalik12's homepage!
 
Old 03-29-2011, 04:51 AM Re: border in <li>
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,376
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
You can't "centre" something that is full width.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-29-2011, 05:09 AM Re: border in <li>
asmalik12's Avatar
Extreme Talker

Posts: 173
Name: Abdullah Saleem
Trades: 0
Ok. I used incorrect word "centered".

But It shouldn't be like this

__________________
"Think 100 times before you take a decision, But once that decision is taken, stand by it as one man." - Quaid-e-Azam
asmalik12 is offline
Reply With Quote
View Public Profile Visit asmalik12's homepage!
 
Old 03-29-2011, 05:16 AM Re: border in <li>
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,376
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Take a look at the W3c box model

As you can see from that, it is either the left padding of the parent and/or the left margin of the child that is creating the "spacing"
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-29-2011, 11:42 PM Re: border in <li>
shivaji's Avatar
Ultra Talker

Posts: 321
Trades: 0
Change padding definition for ul
ul.latest {
list-style-type: none;
margin: 0px;
padding: 0px 10px 5px 10px;
}
__________________

Please login or register to view this content. Registration is FREE
- uncommon free scripts

Please login or register to view this content. Registration is FREE
- Städte, Sport, Party, Gourment, Apartments, Hotels
shivaji is offline
Reply With Quote
View Public Profile Visit shivaji's homepage!
 
Old 03-30-2011, 03:06 PM Re: border in <li>
Shey's Avatar
Keeper of the herd

Posts: 1,597
Name: Shey
Location: Behind you, laying my ever corrupting hands upon your shoulders. Soon, you shall be an extension of me.
Trades: 0
you mean inline blocked text?


add to your <li class


Code:
display: inline-block;
display: inline;
or you can try
float:

with small adjustment to the width
__________________
RenditionDigital provides Software Development, Games Development, Digital Publishing, Social Media moderation in all flavors-
Please login or register to view this content. Registration is FREE
. What is software engineering? There is a great group of highly skilled tech people
Please login or register to view this content. Registration is FREE
. |Also visit My Blog
Please login or register to view this content. Registration is FREE
Shey is offline
Reply With Quote
View Public Profile Visit Shey's homepage!
 
Reply     « Reply to border in <li>
 

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.75081 seconds with 12 queries