473,385 Members | 1,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How Can I Override CSS in Sidebar for 1 Section?

I am trying to override the default CSS text & link formatting for the right sidebar of my website. I am trying ot paste a 200x200 ad in the sidebar but want to be able to format it independently of how the CSS is formatting the rest of the sidebar.

For example, the links on the sidebar are all italicized & in orange, but I want them to be the standard blue and non-italicized. I tried encasing the html in a table with different formatting, but that did not work.

The Google ads that are on the site are not affected by the CSS but I don't know much about javascript or how to intiate a similar fix.

Any suggestions?
Aug 30 '07 #1
1 1371
markrawlingson
346 Expert 100+
There are three ways to apply CSS :

1) Apply it globally over every single tag element on the page
IE: a { color:orange;}
This will take effect over every single link on the page, except for those which you've defined a different "class" for.

Or

2) set the style statically for each element by its class name or id
IE: a.subMenuLink { color:blue }
This will take effect over all the links on the page which you've defined as class="subMenuLink"
<a href="whatever.html" class="subMenuLink">whatever link</a>

Or

3) Set the style statically inside of each tag itself.
IE: <a href="whatever.html" style="color:blue;">whatever link</a>
This will ONLY affect this particular link.

Option #2 or #3 should solve your problem. They will override your CSS for global link style and apply a different style to just the links you wish it to.
Aug 30 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Stan R. | last post by:
Greetings. I have a couple of questions concerning CSS layouts, as apposed to the old <tablemethod for creating layouts . Even after spending the last few days searching all over Google Groups, I...
14
by: Mark | last post by:
please view http://mnbayazit.com/misc/sample.gif i'm wondering how i can make the sidebar (green) float to the right of the main text, without specifying the width of the main content (because...
1
by: pixelfreaks | last post by:
Hello, I am having a problem in aligning the sidebar and content area in a webpage. I am using css. Consider the below layout. __________________________________________ | ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.