1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Where does CSS information come from?

Discussion in 'Content Management' started by xarzu, May 28, 2014.

  1. #1
    Where does CSS information come from? The obvious answer is that format information for a button or similar object comes from a CSS file.
    I have a mod that new users use when the register on my phpbb forum. One of the pages looks like this:
    h t t p : / / w w w . a r g u e m a x . c o m / i m a g e s / p r o b l e m s / 5 - 2 8 - 2 0 1 4 / C a p t u r e _ 0 1 . P N G. I will keep this post look a bit cleaner and post graphics as links. If you notice, the payment button is not the proper size.
    php code is interpreted and presented on the client in the HTML format. In some web browsers, you can look at the source page. When I do this for this page, I see this h t t p : / / w w w . a r g u e m a x . c o m / i m a g e s / p r o b l e m s / 5 - 2 8 - 2 0 1 4 / C a p t u r e _ 0 1 . P N G. This tells me that the object I need to modify is called payment_button. When I search for this string, I find it defined in two CSS files:
    • h t t p : / / w w w . a r g u e m a x . c o m \ _ p h p B B - 3 . 0 . 1 2 \ s t y l e s \ p r o s i l v e r \ t h e m e \ p a y m e n t . c s s
    • h t t p : / / w w w . a r g u e m a x . c o m \ _ p h p B B - 3 . 0 . 1 2 \ s t y l e s \ p r o s i l v e r \ t h e m e \ m e m b e r s h i p . c s s
    The button graphic is 147 x47 pixels
    h t t p : / / w w w . a r g u e m a x . c o m / i m a g e s / p r o b l e m s / 5 - 2 8 - 2 0 1 4 / C a p t u r e _ 0 3 . P N G
    When I load the two .css files in a browser and view the source that is passed down, they both define the payment_button correctly
    h t t p : / / w w w . a r g u e m a x . c o m / i m a g e s / p r o b l e m s / 5 - 2 8 - 2 0 1 4 / C a p t u r e _ 0 5 . P N G
    When the original page h t t p : / / w w w . a r g u e m a x . c o m / i m a g e s / p r o b l e m s / 5 - 2 8 - 2 0 1 4 / C a p t u r e _ 0 1 . P N G is viewed as source, we can see what .css files this page uses
    h t t p : / / w w w . a r g u e m a x . c o m / i m a g e s / p r o b l e m s / 5 - 2 8 - 2 0 1 4 / C a p t u r e _ 0 6 . P N G from the highlighted area, I can create a test string in my browser, h t t p : / / w w w . a r g u e m a x . c o m / _ p h p B B - 3 . 0 . 1 2 / s t y l e . p h p ? i d = 1 & l a n g = e n
    When this address is tested in a browser, it seems to generate a style.css file. I do not find a comparable style.css file out on the server. when I look at this file that is generated as source in the browser, I see:
    
    .payment_button
    { 
     color:white;
     height: 45px;
     width: 116px;
     background-color: transparent;
     background-repeat: no-repeat;
     border: 0px solid #FFFFFF;
     display: block;
     cursor: pointer;
    }
    Code (markup):
    How this is made is a mystery to me. I do not know PHP well enough to decipher style.php. I suppose the height: 45 and the width:116 must come from the database somehow. The css files both describe the proper settings:
    
    .payment_button
    { 
     color:white;
     height: 47px;
     width: 147px;
     background-color: transparent;
     background-repeat: no-repeat;
     border: 0px solid #FFFFFF;
     display: block;
     cursor: pointer;
    }
    Code (markup):
    Sorry I cannot post urls in this post, it is the policy here. I think I am able to convey what I am talking about besides. So, how do I make this work?
     
    xarzu, May 28, 2014 IP
  2. kenzo22

    kenzo22 Member

    Messages:
    177
    Likes Received:
    11
    Best Answers:
    2
    Trophy Points:
    43
    #2
    If some other styles are overwriting your CSS, maybe try adding !important to attributes that don't work? Fo example - width: 147px !important;
    If this doesn't help, you may be loading your stylesheets in wrong order or something.
     
    kenzo22, Jun 1, 2014 IP