Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    May 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    my css style is override why?

    Hello

    I am working on a big site and i am wondering why my css style is ovrride.

    I have the following code somewhere:

    Code:
    <div id="center-slideshow" style="text-align:center !important;">
    		<div id="slideshow" style="width:500px; height:332px;">
    				Hallo
    		</div>
    </div>
    When I load the side, I see with firebug, that the style="text-align:center !important;" is beeing override by some other css stile when the second div (id="slideshow") is displayed. How can I prevent that from happening?

    Thanks

  • #2
    New Coder
    Join Date
    May 2011
    Posts
    22
    Thanks
    4
    Thanked 0 Times in 0 Posts
    It is best if you do all your styling in your CSS, not inline.

    What is the full class name of the code that is over-riding your code? Is it #slideshow?

  • #3
    New to the CF scene
    Join Date
    May 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Firbug output:

    Code:
    element.style{
       height: 332px;
       width: 500px;
    }
    
    div#wrapperholder table,                   template.css (line 51)
    div#wrapperholder div {
       text-align: left;
    }
    
    inherited from div#center-slideshow
    
    element.style{
       override--- text-align:left;
    }
    ...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •