Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   Customize text widget's margins individually (http://forum.bytesforall.com/showthread.php?t=16122)

maralian Nov 29, 2011 12:55 AM

Customize text widget's margins individually
 
Atahualpa rocks!!! One question: I want to change the margins but only on certain text widgets in my sidebar. I know there is an option in:

ΑΤΟ > Sidebars & Widgets > Style widgets > Widget Container but that does the job for all of them.

I want to experiment only with three of my text widget's margins... How do I do that?

Thanks in advance :)

juggledad Nov 29, 2011 03:23 AM

you need to look at the source of a generated page. Then you can examine the widgets and see if there is a ID="..." with the widget. Using that in your CSS Selector, you can then craft some css for each widget specifically

maralian Nov 29, 2011 04:27 AM

I think I got what you mean.

One of my widget's code looks like this:

<div id="text-3" class="widget widget_text"> <div class="textwidget"><div class="textwidget"><a title ...... ></div></a>

Where and what code should I put, in order to make top and bottom margins 15px for example

juggledad Nov 29, 2011 04:38 AM

this is where you need to start learning CSS

CSS is made up of a SELECTOR and some RULES - the more specific a selector the narrower the focus of where the rules are applied. You have seen a 'wide' selector when you gave the widgets a margin in the theme options, it applied it to all widgets. You can use the ID to make your selector very strict and it will only apply to this widget.

a great reference for CSS is http://w3schools.com/css

Once you code your selector and rules you can put them in the CSS Inserts option of the theme (ato->Add HTML/CSS Inserts->CSS Inserts)

maralian Nov 29, 2011 07:25 AM

Let me see if I got this thing right because CSS is totally new for me...

The id of my widget is "text-3"

now for the selector and the rules it should be something like this {margin-top:15px;} ????

so the CSS in ATO->Add HTML/CSS Inserts->CSS Inserts will be

text-3 {margin-top:15px;} :o

juggledad Nov 29, 2011 08:14 AM

You need a pound sign to identify the ID
HTML Code:

#text-3 {margin-top:15px;}
note this will only effect the TOP margin

maralian Nov 29, 2011 08:35 AM

I can’t thank you enough...!

I really appreciate that you didn't give me a straight answer but helped me to find out how to solve this and probably other similar issues by myself with just your guidance...

That old Chinese Proverb is so true...!

worthwhileluxury Dec 22, 2011 08:27 AM

Quote:

Originally Posted by juggledad (Post 76714)
You need a pound sign to identify the ID
HTML Code:

#text-3 {margin-top:15px;}
note this will only effect the TOP margin

Hi there, I'm looking at all your replies and I have tried all sorts of variations but I just can't do it.
I have a block quote in the right-inner sidebar and I have used the # Identifier and tried all sorts of things you say here but it just won't work.
The block quote appears like a long thin little block and doesn't fill the sidebar from left to right.
It seems as though there is padding.
Can you help? Do you look at my site? http://wisemanconcept.com

worthwhileluxury Dec 22, 2011 08:36 AM

Is there such a thing?
It is the testimonial plugin which puts the the testimonial excerpt into a 'block quote' on the front page. If I reduce the padding to 0 it brings the text closer to the block quote border but it doesn't move the block quote border closer to the side-bar edges so I can't imagine that it would work.
I'll give it a try.

lmilesw Dec 22, 2011 08:37 AM

Quote:

Originally Posted by worthwhileluxury (Post 77822)
Hi there, I'm looking at all your replies and I have tried all sorts of variations but I just can't do it.
I have a block quote in the right-inner sidebar and I have used the # Identifier and tried all sorts of things you say here but it just won't work.
The block quote appears like a long thin little block and doesn't fill the sidebar from left to right.
It seems as though there is padding.
Can you help? Do you look at my site? http://wisemanconcept.com

Take a look in the blockquote section of the theme options.

worthwhileluxury Dec 22, 2011 08:47 AM

tried negative. doesn't work.

worthwhileluxury Dec 22, 2011 08:56 AM

I have tried everything in the theme options. Changed padding to 0 everywhere. Nothing works.
Is it the widget? I have CSS identifying the testimonial blockquote and I have inserted that in the blockquote CSS but still nothing.
Surely there must be a way to fix this. Any suggestion? Do I go to the widget designer?

juggledad Dec 22, 2011 09:12 AM

Swimflyfast2 - ill check it when I get home, out doing Xmas errands

Worthwhileluxery - you are doing what is known as hi-jacking a thread. Now there are two issues and you are taking advise ment for the other issue. Please open a new thread and state your issue.

worthwhileluxury Dec 22, 2011 09:19 AM

Gosh thanks for letting me know. I had no idea. I am new at this. Will do.


All times are GMT -6. The time now is 03:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.