Jump to content


Photo
- - - - -

Customise Universal Sidebar

CSS PHP customisation sidebar

  • Please log in to reply
7 replies to this topic

#1 cerchris

cerchris

    Advanced Member

  • Members
  • 58 posts
  • LocationChristchurch, New Zealand
  • Framework Version:2.3
  • Country: Country Flag

Posted 14 December 2012 - 02:44 AM

Hi There

 

Although my CSS is improving quickly having customised this site with little help, I am still quite a newbie when it comes doing doing some PHP. Can anyone help with achieving a sidebar customisation on this site

Please Login or Register to see this Hidden Content

 

I have attached a layout file to depict what I want to achieve - many thanks

 

Please Login or Register to see this Hidden Content

 

Please Login or Register to see this Hidden Content

  73.89KB   33 downloads



#2 James B

James B

    Advocate

  • Members

  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 14 December 2012 - 03:06 AM

Hi there, you can achieve that layout using css you won't need to use php. What were you looking to do with the php?

 

Looking at your site you already have the widgets in place, so you'll need to color the widget title background using css and apply a border to the left of the sidebar column. The buttons could be inserted using the pagelines shortcodes on the tools page of the demo :)



#3 cerchris

cerchris

    Advanced Member

  • Members
  • 58 posts
  • LocationChristchurch, New Zealand
  • Framework Version:2.3
  • Country: Country Flag

Posted 18 December 2012 - 08:11 AM

ok great I will give it a go.

 

So I put this code in the widget window?:

  1. [pl_button type="success" link="

    Please Login or Register to see this Hidden Content

    " target="blank"]
  2. Success
  3. [/pl_button]

And I could style the button using?:

.pl_button {

......

}



#4 Danny

Danny

    Is Awesome!

  • Moderators
  • 17532 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 18 December 2012 - 08:26 AM

Hi,

 

Add the button shortcode to your text widget replacing the read more link you already have. Then inorder to style your button, I recommend you create your own, use the following:

 

Please Login or Register to see this Hidden Content

Now what I would do is replace btn-success with your own class, for example:

 

.btn-korugreen

 

Then view the CSS used for the .btn-success and change it so that it uses the style you want and then add it to your custom CSS/LESS.



#5 cerchris

cerchris

    Advanced Member

  • Members
  • 58 posts
  • LocationChristchurch, New Zealand
  • Framework Version:2.3
  • Country: Country Flag

Posted 19 December 2012 - 01:27 AM

Thanks for the help Danny, getting on pretty well except I need some help with the following

Please Login or Register to see this Hidden Content

  1. The text in the "what others say" section is fine, but the text in the subscribe section is set to "p" (unlike the text in the first sidebar section) and not displaying correctly. How can I setup the text to display the same in both sidebar sections.
  2. Send button is mostly fine except I can't get the selector right to style the hover of that button.
  3. Read more button is all over the show, can you help with the hover styling please and also I wd like this to align left with the left edge of the above text

many thanks



#6 James B

James B

    Advocate

  • Members

  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 19 December 2012 - 02:59 AM

Hi there,

 

In the widget where the text is having <p> tag added, check you've not ticked the checkbox 'automatically add paragraphs' on the text widget in Appearance>widgets.

 

For the hover on the button, it looks like you need to adjust the background-position on the hover effect.

 

Please Login or Register to see this Hidden Content

You can align the text using css too, to move the position of the button you'll need to adjust the margin/padding of the <p> element the button is sitting in.

 

Please Login or Register to see this Hidden Content



#7 cerchris

cerchris

    Advanced Member

  • Members
  • 58 posts
  • LocationChristchurch, New Zealand
  • Framework Version:2.3
  • Country: Country Flag

Posted 19 December 2012 - 11:44 AM

Thanks for that  - got the text alignment sorted and the bottoms in place, still no luck with the hover states of both buttons. The css you suggested seemed to make it worse:

Please Login or Register to see this Hidden Content

Any others ideas?

 

Now just need the hover state of the "read more" button to line up, and I can't get a hover effect to work on the "send" button. In both cases I am wanting the hover effect to be the vertical flip of this color gradient :
background-image: -moz-linear-gradient(center top , #7ea24a, #576330);



#8 Danny

Danny

    Is Awesome!

  • Moderators
  • 17532 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 19 December 2012 - 01:03 PM

The issue is you have added some custom CSS which adds a height and width to the button please remove this code, as it is causing the text alignment issue.

 

Also, you have only added the background-image gradient code for mozilla, so your button will only look correct in the FireFox browser, please use Google Chrome web dev tool and inspect a PageLines standard button and copy this code, then make the changes for you new button color.







Also tagged with one or more of these keywords: CSS, PHP, customisation, sidebar