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 5 of 5
  1. #1
    New Coder
    Join Date
    Oct 2011
    Posts
    20
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Right to left modifications

    hello.

    does anyone have a clue how can i make those to lists (ul li tags) on the sides be right to left?

    http://www.nirasnaturalway.com

    Tried to inspect it with firebug, and add direction:rtl to the code in many different places, but nothing works.

    Any ideas?

    Thanks!

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello gimano,
    To start with, you've copy/pasted the same error all over your CSS. "
    direction:rtl !importnant;" should be
    Code:
    direction:rtl !important;
    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

  • #3
    New Coder
    Join Date
    Oct 2011
    Posts
    20
    Thanks
    1
    Thanked 0 Times in 0 Posts

    ooooops.....

    thanks!
    i fixed that, but still, the lists are still not rtl.....

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    In this demo, switch the direction back and forth from rtl to ltr to see the difference it makes -
    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">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    html, body {
    	margin: 0;
    	background: #fc6;
    	direction: rtl;
    }
    #container {
    	width: 800px;
    	margin: 30px auto;
    	background: #999;
    	overflow: auto;
    }
    html, body {
    	margin: 0;
    	background: #fc6;
    }
    #container {
    	width: 800px;
    	margin: 30px auto;
    	background: #999;
    	overflow: auto;
    }
    ul {
    	width: 400px;
    	margin: 20px auto;
    	background: #ccc;
    }
    
    </style>
    </head>
    <body>
        <div id="container">
            <ul>
                <li><a href="#">some words in english</a></li>
                <li><a href="#">חיים מתוקים ללא סוכר</a></li>
                <li><a href="#">כדורי חלבה</a></li>
                <li><a href="#">רו פוד סגולות ונפלאות</a></li>
                <li><a href="#">התזונה הטבעית</a></li>
            </ul>	
                <p>
                	with a lost ship, the USS Cygnus, just outside its event horizon. Deciding to solve the mystery of the Cygnus are:
                    Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna 
                    aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no 
                    sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam 
                    nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo 
                    duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
                </p>
        <!--end container--></div>
    </body>
    </html>
    In the code you're working with online, make this one change in your green.css (highlighted in red) and see what happens when you switch rtl to ltr -
    Code:
    ul.mostread li{
    /*list-style:none;*/
    	background:url(../images/green/menu_arrow.gif) top left no-repeat;
    }
    No DocType I tried reverses the text like you might think the direction property would...it seems to do nothing different than text-align right/left.

    Found this - http://reference.sitepoint.com/css/direction that talks about unicode-bidi

    Add this bit of CSS to my code snippet above and see what happens -
    Code:
    p{
    direction: rtl;
    unicode-bidi: bidi-override;
    }
    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

  • Users who have thanked Excavator for this post:

    gimano (02-13-2012)

  • #5
    New Coder
    Join Date
    Oct 2011
    Posts
    20
    Thanks
    1
    Thanked 0 Times in 0 Posts

    problem solved!

    got it, thanks!


  •  

    Posting Permissions

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