Forum Moderators: not2easy

Message Too Old, No Replies

Changing spot to right

         

Kevve

9:50 pm on Aug 13, 2010 (gmt 0)

10+ Year Member



I mean, this is so easy that I can't solve it. I'm convinced the answer is so easy that when I find out what it is imma be like /facepalm.

Seriously, I'd like to get
#rightcol {width:390px; float:left;}
#rightcol h2{ font:bold 15px "Trebuchet MS", helvetica, sans-serif; color:#fff; margin:10px 10px 5px 5px; background-color:#34040a; width:220px; padding:0px 13px 0px 13px; background-image:url(images/rightcol.jpg);}
#rightcol ul { list-style-type:none; margin:0px 0px 0px 12px; font-size:10px; font-weight:bold;}
#rightcol ul li{margin:0px; padding:0px;}
#rightcol p {padding:0px 0px 0px 0px;}
#rightcol a { display:block; width:0px; left:15px; text-transform:uppercase;}
15 pixel to the right. And I can't find out how to do.

JevgeniBogatyrjov

12:10 am on Aug 14, 2010 (gmt 0)

10+ Year Member



If you want to move #rightcol 15 right, you probably have to add margin-left:15px; to #rightcol.
That will add a 15 px gap between #rightcol and the column to the left.

That is true assuming #rightcol is a div or other element that is display:block; by default.

Major_Payne

1:40 am on Aug 14, 2010 (gmt 0)



As stated, left margin would do it. Remember, you are floating "#rightcol" left and that removes it from the document flow and moves it all the way left within the container it is in.

Use of "0px" is not not needed with a dimension. Just "0" is sufficient. Also, where you have all that coding like "#rightcol p {padding:0px 0px 0px 0px;}", that could be left out and the use of the Universal Selector at the very beginning of your CSS would take of those. You only add that if something else may have set margings for those selectors.

Universal Selector:

* { margin: 0; padding: 0; border: 0; }


That at the very beginning of the CSS levels out all mysterious stuff from pages before your own CSS styling takes over. Some people use the CSS Reset file, but that's not always needed. In fact, some of it does not validate.