custom image class

Posted in: Newspaper
Post count: 50

Hello I insert this code inside the Custom CSS section of the theme in order to achieve this result

img.nature {
margin: 20px;
padding: 20px;
border:solid #003300 4px;
background: #006600;
}

and then I write the nature class inside the image CSS class field inside image options, but it won’t work.

Can you help me on doing this the right way please? I don’t want to write the div in the html part, I just want to make it work in image details > image CSS class.

Thanks

Post count: 23312

Hello skyscorcher,

You need to make a custom class and this can be done it from Article editor, like this: http://screencast.com/t/XANknxJnhttp://screencast.com/t/FMLuokGOgl43http://screencast.com/t/iDO34Er3qhttp://screencast.com/t/OIPz8uJKzk4 .
After make this changes, please try the code below and place it in Theme panel->Custom Css area.

.custom_class {
margin: 20px;
padding: 20px;
border:solid #003300 4px;
background: #006600;
}

Hope this helps and let us know how it goes!

Than you for message!

Post count: 50

I see, that did the trick, but I would like to add a class to make images with border-radius: 15px for example

This won’t work though.

Is there another way to achieve this border radius for pictures with a class?

thanks

Post count: 22421

Hello,
You can use the method above and simply add the border-radius property: http://screencast.com/t/txy89wbCo
so you would use the code like so:
.custom_class {
margin: 20px;
padding: 20px;
border:solid #003300 4px;
border-radius:25px;
background: #006600;
}

Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.