HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Block 50% Screen Width

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#32774 (In Topic #7421)
Joe
Avatar

Honoured member

Just need the parameter

I've removed the Poll & IOTD Blocks since my ocPortal installation, and I wanted to add them back at a 50% screen width. I don't remember the parameter to do this, and the 'Add Block' feature doesn't give much information on the 50% screen width parameter.

Back to the top
 
Posted
Rating:
#32775
Avatar

Community saint

Code

<div style="width: 48%; float: left">[block]block name[/block]</div>
<div style="width: 48%; float: right">[block]block name[/block]</div>

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#32778
Joe
Avatar

Honoured member

Hrmm… There isn't an actual parameter that's placed inside the tag? Ah well, doesn't matter. Thanks Ami. :)

Back to the top
 
Posted
Rating:
#32779
Avatar

Community saint

nope its a css tag that is used.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#32780
Joe
Avatar

Honoured member

There has to be a parameter to make it at a 50% screen width. Most of the content on my front page is wrapped in quote tags for easier seperation of content. Comcode isn't really meant to be inside HTML, or at least I wouldn't think so because it can sometimes get confusing and messy.

Ami, in order for that to actually work, you'd need something like this:

Code

[quote][html]<div style="width: 50%; float: left">[/html][block]main_poll[/block][html]</div>[/html][html]<div style="width: 50%; float: right">[/html][block]main_iotd[/block][html]</div>[/html][/quote]

Although this does work, it isn't displayed properly in the quote tags.

Back to the top
 
Posted
Rating:
#32781
Avatar

Community saint

do not actually use 50% use 49 or 48 I have found 50 does not work.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#32782
Avatar

Community saint

Make sure you put it in semihtml not html

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#32784
Joe
Avatar

Honoured member

It makes no difference, Ami. It's still not wrapping correctly in the quote tags. :P

Back to the top
 
Posted
Rating:
#32786
Joe
Avatar

Honoured member

Ah well, it's okay. I'll leave these blocks outside of the quotes. Thanks again Ami. :)

Back to the top
 
Posted
Rating:
#32787
Avatar

Community saint

I got it to work with the quote tag on my site but I put the quote in side the semihtml and it worked.
It did not show up right away but showed up after I did the cache clean up.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#32788
Joe
Avatar

Honoured member

Hrmm… It's not working for me, and I even cleared the cache. Here's a screeny:


Back to the top
 
Posted
Rating:
#32789
Joe
Avatar

Honoured member

Also, I get validation errors when placing the quote tags inside the semihtml tags.

Back to the top
 
Posted
Rating:
#32790
Avatar

Community saint

Whats the code look like?

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#32791
Avatar

Community saint

Code

[semihtml][quote][title="1"]Welcome to {$SITE_NAME}[/title][block=&quot;3&quot;]main_greeting[/block] <br />
<br />
 <div style="width: 48%; float: left;">[block]main_awards[/block]</div><div style="width: 48%; float: right;">[block]main_iotd[/block]</div> <br class="float_passer" /> <br />
<br />
[block=&quot;14&quot;]main_news[/block] <br />
[block=&quot;quotes&quot;]main_quotes[/block] <br />
[block]main_forum_topics[/block] <br />
[block=&quot;5&quot;]main_top_downloads[/block] <br />
[block=&quot;5&quot;]main_recent_downloads[/block] <br />
[block=&quot;5&quot;]main_top_galleries[/block] <br />
[block=&quot;5&quot;]main_gallery_embed[/block] [/quote][/semihtml]
This is what I have on the test site which does work.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#32796
Avatar

The:

Code

<br class="float_passer" />
is the key bit there.

The 'semihtml' tag prevents the messyness, as it allows you to mix Comcode and XHTML/CSS freely. The design is that Comcode should not try and replace XHTML or CSS, but instead work smoothly with it (in situations like this where textual layout doesn't reflect screen layout).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: