1
Fritz
Unique Block style in column
  • 2004/5/5 19:09

  • Fritz

  • Just popping in

  • Posts: 47

  • Since: 2004/5/5 1


I need to find a way to have one block in a column have a unique style from the rest of the blocks in the column, i.e. different colors, font size, etc.

To see what I mean, take a look at the design I'm trying to port to XOOPS:

Nevus.org design mock-up

I want to create the navigational menu a the top of the left column using something like the multiMenu module.

Essentially, I'm having trouble breaking down the CSS and determining how this can be accomplished.

2
Brad
Re: Unique Block style in column
  • 2004/5/6 0:26

  • Brad

  • Not too shy to talk

  • Posts: 150

  • Since: 2003/12/4


As an example, if you were wanting to change the appearance of the main menu you would...

Edit system_block_mainmenu.html via the template set manager. Add your new colors, font sizes, and whatever else to the table where appropriate.

3
tjnemez
Re: Unique Block style in column
  • 2004/5/6 4:43

  • tjnemez

  • Home away from home

  • Posts: 1594

  • Since: 2003/9/21


hey fritz,

you could edit your template, however this will not change the appearance of you block, only your menu. if you do edit your template make sure you clone them first and then edit the clone.

you can change the appearance of the menu and block with css(style sheet you have in your current theme directory).

you may do some searches and familiarize with some of these exercises like cloning templates and such before you make some changes.


4
rabideau
Re: Unique Block style in column
  • 2004/5/6 11:13

  • rabideau

  • Home away from home

  • Posts: 1042

  • Since: 2003/4/25


There's a commented version of a fairly standard XOOPS css. This might help you find things. go tohttp://eirenicon.org (Corporate site) Downloads and grab silver theme.

Also you might check out a couple of my sites to see some of the things I play with in terms of look& feel.

5
Fritz
Re: Unique Block style in column
  • 2004/5/6 18:23

  • Fritz

  • Just popping in

  • Posts: 47

  • Since: 2004/5/5 1


tjnemez,

Quote:
you can change the appearance of the menu and block with css(style sheet you have in your current theme directory).


I know I can control the general appearance of the blocks, such as border, title, background, font, etc., using the CSS, but from what I can tell so far these changes apply to all blocks within a column - change one, change them all.

I am assuming that if I can figure out how to apply a different style sheet to the appearance of a particular module's block that I can make the block appear differently from the rest of the blocks in that column.

Am I on the right track, or way off base?

6
Mithrandir
Re: Unique Block style in column

You are right - but it is not really the way XOOPS is built.

However, you can go to your theme.html and in the loop of blocks you want (left, right, center-center, center-right or center-left) put an if statement:
<{if $block.title == "[Special blocktitle]"}>
    
//show the block like this
<{else}>
    
//show the block normally
<{/if}>

7
rabideau
Re: Unique Block style in column
  • 2004/5/6 18:34

  • rabideau

  • Home away from home

  • Posts: 1042

  • Since: 2003/4/25


Your css definitions define how all sheets (html & php pages) appear that use a give set of css specifications. You can create a unique set of css definitions within a previously defined css sheet. Then in a modified html doc you can use the new css look... without impacting other sheets that make use of the original definitions.

As I noted ealriler, you can see that in the downloads I mentioned.

8
Fritz
Re: Unique Block style in column
  • 2004/5/6 18:39

  • Fritz

  • Just popping in

  • Posts: 47

  • Since: 2004/5/5 1


Thanks very much for your help.

Now if I can get my problem solved with cloning a template set (a different thread) I'll play around and let you know how it goes, or come back for help.

Again, thanks.
Fritz

9
Fritz
Re: Unique Block style in column
  • 2004/5/6 20:55

  • Fritz

  • Just popping in

  • Posts: 47

  • Since: 2004/5/5 1


Alrighty then!

Mithrandir's suggestion to use an if statement in the theme.html file to apply a different CSS definition to a particular block based upon that block's title worked like a charm!

I wouldn't have known how to write the if statement in Smarty code without the example. I guess I'm going to need to learn Smarty next.

Anyway, my thanks to all!
Fritz

10
WarDick
Re: Unique Block style in column
  • 2004/5/6 22:22

  • WarDick

  • Just can't stay away

  • Posts: 890

  • Since: 2003/9/13


Rule of thumb.

Always use CSS first. For the best performance.

Login

Who's Online

254 user(s) are online (161 user(s) are browsing Support Forums)


Members: 0


Guests: 254


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits