ballouta Posted October 17, 2008 Share Posted October 17, 2008 Hello I tried to modify my css many times but nothing is working, I hope this can be solved easily here. I am trying to edit an HTML page to write in the white space. If i write any english word/sentence, it works perfect... (direction ltr as known) you may see a live preview here: www.dmcpublisher.com/Store If i just make the (text-align: right), the text goes out of the white space where it should stay inside! I want to add arabic text which begins from right to left. live preview: www.dmcpublisher.com/Store/index2.html Many thanks Quote Link to comment Share on other sites More sharing options...
haku Posted October 17, 2008 Share Posted October 17, 2008 You need to change this: in.3 {padding-left 25px;} to: in.3 {padding: 0 25px;} Quote Link to comment Share on other sites More sharing options...
ballouta Posted October 17, 2008 Author Share Posted October 17, 2008 Thank you, it is working now, what does 0 and 25 mean? Quote Link to comment Share on other sites More sharing options...
dropfaith Posted October 17, 2008 Share Posted October 17, 2008 There is also a shorthand margin property, which is great if you're setting each side differently. The sequence is clockwise from the top — top, right, bottom, left. div {margin: 20px 0px 100px 10px; } Note that there are just spaces between the values, no semicolons. not sure what only 2 rules go for i normally would use 0s to fille all for if using shorthand code Quote Link to comment Share on other sites More sharing options...
haku Posted October 18, 2008 Share Posted October 18, 2008 If the shorthand is used, and a value is left out, CSS fills it in using the values that exist. Here are some examples. This: margin: 10; Is the same as this: margin: 10 10 10 10; Since left, bottom, and right are missing, it sets all the values to the one value that exists - ten. Next, this: margin: 10 20; Is the same as this: margin: 10 20 10 20; Since the top value is set to ten, and the bottom value is missing, it sets the bottom value to the same as the top value - ten. Since the left value is missing, it sets the left value to the same as the right value - 20. Next, this: margin: 10 20 30; Is the same as this: margin: 10 20 30 20; Since the left value is missing, it sets the left value o the same as the right value - thirty. Edit: So for the OP - he had a left padding of 25 pixels, but nothing set for the top, right, and bottom padding. I gave code that set the top and bottom padding to zero, and the right padding the same as the left padding - 25 pixels. Quote Link to comment Share on other sites More sharing options...
ballouta Posted October 19, 2008 Author Share Posted October 19, 2008 Thanks for this nice explanation Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.