Announcement

Collapse
No announcement yet.

Background

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Background

    Is it better to make things transparent or give them a uniform colour?

    I have chosen to give most elements the same colour ID #whatever.
    If I choose to give the background a colour ID, do I give everything else the same ID or make it transparent?
    Or is it the same thing?

    Ta...



  • #2
    Think of things as layers. The "body" is the lowest layer. Then we put several layers on top of that...

    body -> wrapper -> header, footer, navbar, content areas -> content, modules -> sub-content


    Using CSS, each layer will inherit the settings from those above it unless you specifically tell the system otherwise. In other words the Styles Cascade from one element to the next like a waterfall. This is why it is called Cascading Style Sheets. If you use Transparent allows elements to inherit the background of underlying elements but also gives you the ability to override that inheritance in the future if you wish. Setting them to the same color makes more work in the long run. If you change your body background to yellow in the future, then you have to change everything else to yellow. If you set them to transparent, then they will turn yellow automatically.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment


    • #3
      I've create a rough and basic layout on how the page is built in this image... I used different colors to show how it is layered in the code and the CSS.

      Click image for larger version

Name:	rough-basic-vbpage.png
Views:	1
Size:	7.0 KB
ID:	3691129
      Translations provided by Google.

      Wayne Luke
      The Rabid Badger - a vBulletin Cloud demonstration site.
      vBulletin 5 API

      Comment


      • #4
        Very good..........

        Once again thanks for your efforts... Much appreciated.

        - - - Updated - - -

        A little confusion here.

        Using CSS, each layer will inherit the settings from those above it? Or below it?

        For example, if the body is the bottom layer and the colour is yellow, does that mean all the layers on top will inherit the yellow colour unless I specifically tell the system otherwise?


        Comment


        • #5
          Inherits from the parent element or layer. Body would be the considered the top level layer by the code even though it is the bottom level layer in the presentation.
          Translations provided by Google.

          Wayne Luke
          The Rabid Badger - a vBulletin Cloud demonstration site.
          vBulletin 5 API

          Comment


          • #6
            From that explanation I make the analogy that 'body' is the first gate the code goes through during loading and then everything else passing through that gate inherits that gates properties or does what we ask it to do.

            Analogy or assumption? Either way I am beginning to understand something.

            Thanks again for your time.


            Comment


            • #7
              That's correct. Think of it like a house - the 'body' section is your foundations, wrapper is your ground floor, orange areas next with the Modules as your top floor. From a CSS perspective, it works up from the foundations to the roof so anything added on top of the base will override what's underneath it.
              Vote for:

              - *Admin Settable Paid Subscription Reminder Timeframe*
              -
              *PM - Add ability to reply to originator only*
              - Add Admin ability to auto-subscribe users to specific channel(s)
              - "Quick Route" Interface...

              Comment


              • #8
                Splendid! Cheers Trev, clarified something there.


                Comment

                Related Topics

                Collapse

                Working...
                X