Jump to content

Direction Problem


ballouta

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/128822-direction-problem/
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/128822-direction-problem/#findComment-668252
Share on other sites

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.

 

Link to comment
https://forums.phpfreaks.com/topic/128822-direction-problem/#findComment-668473
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.