SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist Maujor's Avatar
    Join Date
    Mar 2005
    Location
    Rio de Janeiro - Brazil - South America
    Posts
    409
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Horizontal ordered list

    Are there a way to display via CSS a horizontal ordered list without miss the order numbers?
    HTML:
    Code:
    <ol>
    <li>Link</li>
    <li>Link</li>
    <li>Link</li>
    <li>Link</li>
    </ol>
    Display:
    1. Link 2. Link 3. Link 4. Link

    CSS rules: ?????
    Mauricio Samy Silva
    http://www.maujor.com/

  2. #2
    SitePoint Member ghettopixel's Avatar
    Join Date
    Mar 2006
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is a basic example for you to expand upon, hope this helps you mate, enjoy


    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    <style type="text/css">
    #nav ol 
    	{
    	padding:0px;
    	margin:0px;
    	list-style-position:inside;
    	}
    #nav ol li 
    	{
    	padding: 0px 30px 0px 0px;
    	margin:0px;
    	float:left;
    	}
    #nav ol li a:link , #nav ul li a:active, #nav ul li a:visited 
    	{
    	padding: 0 0 13px 0;
    	color: [PUT HEX OR RGB COLOR HERE (# or rgb() stuff) OR IT WILL BE BLUE];
    	text-decoration: none;	
    	cursor: pointer;
    	}
    </style>
    </head>
    
    <body>
    	<div id="nav">
    		<ol>
    			<li><a href="#">Link</a></li>
    			<li>Link</li>
    			<li>Link</li>
    			<li>Link</li>
    		</ol>
    	</div>
    </body>
    </html>

  3. #3
    SitePoint Evangelist Maujor's Avatar
    Join Date
    Mar 2005
    Location
    Rio de Janeiro - Brazil - South America
    Posts
    409
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Ghettopixel.
    Works in FFox (and in compliants browsers I believe)
    Fail in IE. Now I need a fix for our "kindness" Internet Explorer.
    Mauricio Samy Silva
    http://www.maujor.com/

  4. #4
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.


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
  •