I would add a class to your function and put the styles in your CSS as it’s always preferable to keep functionality and form separate.
i.e.
<div class="foo">
.foo {
width: 45%;
margin-right: 5%;
float: left;
text-align: justify;
}
You are so right with that, absolutely maam! but (sorry no offence) still it is as a function call.
Maybe I didn’t explain what/how I meant the question above, sorry for that. To enlighten some by this sample;
In a post/page we can do it 2 ways, the first way could be like this:
(for left column):
<div class="lcol"> the text here </div>
(for right column):
<div class="rcol"> the text here</div>
And in style.css giving the correct codes for the classes, no shotcode is used this way.
Second way can be done like this, clicking the created button (we did ourselfs, btn are lcol and rcol):
[lcol]{txt here}[/lcol]
and [rcol]{txt here}[/rcol]
Using the shortcode methode is for our authors faster with same output results.
But I actualy was/am curious if a plugin/function call needs more “load” from server than just the “regular” styling way by using “only” css code, as shown in the sample as above now.
I ask that because our site (as it is now) has over 2/3k postings and I am a little afraid that plugins/function calls like these also will have a neg impact on server loads but maybe I am totally incorrect.
Ah – thanks for clarifying. Unfortunately I don’t know the answer to this one but hopefully someone else will chime in. I’ll see if some other folks might know.
Putting it in your css reduces your server load because the browser will only load that css once (and keep it in cache).
You can change your shortcode so that it outputs
<div class="lcol"> the text here </div>
instead of the inline styles.
Thank you both for fast responding, will split up function and styling to where both belong 🙂