Hi I installed image_caption-6.x-2.x-dev.tar.gz and it is working, how do you give Caption different background colour or border?
Hi I installed image_caption-6.x-2.x-dev.tar.gz and it is working, how do you give Caption different background colour or border?
Comments
Comment #1
stevenpatzClearer title.
Comment #2
davidwhthomas commentedYou can style the caption with CSS.
For example, in your themes style.css file:
You can also style .image-caption-container{} though that's probably not needed.
hope that helps,
regards,
DT
Comment #3
droshani commentedI did that but it did not work, How does it work exactly, I have the code for the image from page source
I see only class="caption", does this mean that the class of .image-caption will be picked up by the .caption anyway?
Here is the testing site http://98.131.16.97/?q=node/11 I can see the caption text but not the formating .
Comment #4
davidwhthomas commentedHi,
Yes.
The class "image-caption" is added to the new caption div created by the jQuery javascript.
This happens dynamically when you view the page.
I'd recommend installing Firebug from :
http://getfirebug.com
It will let you 'inspect' the html dom elements and see how the page fits together ;-)
For example, I can see on your linked page the classes image-caption and image-caption-container are correctly applied to the image.
DT
Comment #5
droshani commentedOk, if it is applied how come the effect is not visible? I can see the caption is there and is working but no DIV property.
Comment #6
davidwhthomas commentedThe div property is there for the caption as
You should be able to style that in your theme stylesheet.
Check you CSS syntax or try putting !important after a style declaration in case it's been overridden elsewhere.
i.e
though that shouldn't really be necessary.
I suspect there's something wrong with how you're including the style in your CSS which is not really up to me.
DT
Comment #7
droshani commentedI did but it still does not work, my style.css look like
.box {
margin-bottom: 2.5em;
}
/**
* image caption ----------------------
*/
.caption {
}
.image-caption{
background-color: #eee !important;
padding: 5px !important;
font-size: 0.8em !important;
border:1px solid #aaa !important;
}
.image-caption-container {
background-color: #eee !important;
padding: 5px !important;
font-size: 0.8em !important;
border:1px solid #aaa !important;
}
/**
* Layout
*/
#header-region {
min-height: 1em;
background: #d2e6f3 url(images/bg-navigation.png) repeat-x 50% 100%;
}
But nothing comes up. I wonder whether it is compatible with tis version of Drupla 6.x style
Comment #8
davidwhthomas commentedYour CSS looks alright.
Perhaps you're putting it in the wrong style.css file?
I can't see that CSS in the stylesheets for page link you gave me.
It'll need to be in the one for your current theme.
Also, you probably don't need those styles for .image-caption-container, but it's up to you
DT
Comment #9
droshani commentedI use Garland 6 for Drupal 6.x and I have only one style.cc in the folder for this theme. I think the problem is something else since the Caption text is there but the formate is not correct. The Source View shows that the class="caption" is in img tag.
What can be the problem I do not know,
I realized that the layout will be messed up when the text is longer than the image width, why is that?
Comment #10
droshani commentedHi, I have upgraded to 6.2 and now this caption is shown but the image is pushed out. How can I fix this please?
Comment #11
davidwhthomas commentedcss styling such as margin and padding are at the discretion of the web designer.
Comment #12
droshani commentedwell that is for Drupal designers to think of, mean while what can I do to fix this limitation?