Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2008
    Posts
    13
    Plugin Contributions
    0

    Default button links not aligning properly in side category box

    I just finished changing my text links in side category box to have background buttons that change on rollover. It works well, however there is space in between each button as in attached image. How can I make these position flush one right under each other without any spacing?

    Id also like to make the button a couple more pixels left aligned so its flush right to side category box border.

    Im not sure i even need all the lines of code like margin, padding, etc. Im still figuring this out as I go along.

    Here's the code from stylesheet affecting these buttons:

    Code:
    /* categories box parent and child categories */
    A.category-top, A.category-top:visited {
    	color: #ffffff;
    background-image: url(/images/button-bk.jpg);
    background-repeat: no-repeat;
    display: block;
    width: 180px;
    height: 33px;
    margin: 0;
    margin-bottom:0px;
    padding: 0; 
    	text-decoration: none;
    	font-weight: bold;
    	line-height: 20px
    	}
    	/*Im adding a new hover to try and add a background color button effect*/
    	
    	A.category-top:hover {
    	color: #cccccc;
    background-image: url(/images/button-bk-over.jpg);
    background-repeat: no-repeat;
    display: block;
    width: 180px;
    height: 33px;
    margin: 0;
    margin-bottom:0px;
    padding: 0; 
    	background-color: 000000;
    	text-decoration: none;
    	font-weight: bold;
    	line-height: 20px
    	}
    Attached Images Attached Images  

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: button links not aligning properly in side category box

    Have you eliminated the <br /> after the category name output?
    (In /includes/templates/your_template/sideboxes/tpl_categories.php.)

    That is required for the stock inline link elements to display correctly, but causes the gap when displaying as block or list-item.
    You could look at the Categories Dressing code if you want more pointers.

    You can add

    margin-left: -3px;

    to move the button edge (adjust to taste).
    Last edited by gjh42; 16 Oct 2008 at 07:48 PM.

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: button links not aligning properly in side category box

    Also, you don't need to include any properties in the
    A.category-top:hover {
    rule unless they are different from the plain version (e.g. background-image:).

  4. #4
    Join Date
    Jun 2008
    Posts
    13
    Plugin Contributions
    0

    Default Re: button links not aligning properly in side category box

    Worked great! Thanks Glenn

 

 

Similar Threads

  1. Menu bar and side boxes not aligning properly in Firefox browser.
    By fkalanda in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 1 Dec 2013, 02:01 AM
  2. Product Text Box Not Aligning Properly in Internet Explorer
    By JGiacchi in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 6 Nov 2008, 07:30 PM
  3. Replies: 1
    Last Post: 31 Oct 2008, 07:28 PM
  4. Firefox & IE - Product Text Box Not Aligning Properly
    By JGiacchi in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 19 Oct 2008, 08:13 PM
  5. Changed main layout width but side boxes not aligning properly
    By Bruce_T in forum Templates, Stylesheets, Page Layout
    Replies: 13
    Last Post: 23 Mar 2008, 10:22 PM

Posting Permissions

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