hello friend,
i have a div content and a sidebar content take 60% and sidebar take around 40% the
thsi my css

#sidebar {
        clear: none;
        float: left;
        margin-left: 1.4492%;
        width: 34.7826%;
        display: block;
    }
    #content {
        clear: both;
        float: left;
        margin-left: 0;
        width: 63.7681%;
        display: block;
    }

so in others pages they will not be a side bar i dont wanna keep content div on left i want it ti be in center of the pages

Recommended Answers

All 4 Replies

Just add an override style in those pages, hiding #sidebar and centering #content.

what you mean ?? cause my my style file for global site

Just add another style file for the pages where you want to override that behaviour.

You can put inside ur main css file two classes names,lets say, .fullwidth {width:100% !important;} and .hidediv {display:none !important;}. In the pages that you do not want sidebar to be shown you can add to your sidebar div the .hidediv class and to your content div add the class .fullwidth . This will do the trick for you. Its better performance-wise not to have multiple csd files.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.