Solved

adding an exception to a class, need to modify width

Posted on 2011-03-23
2
315 Views
Last Modified: 2012-05-11
In my attached CSS and HTML, what I want "narrow" to do is override the width, but only if it follows a planseriesbox class. But I think something is not right. I think my syntax is off? Thank you!
div.planseriesbox {
		margin: 0px;
		padding: 0px 10px 10px 0px;
		width: 169px;
		height: 145px;
		float: left;
	}
div.planseriesbox narrow {
		width: 179px;
	}

<div class="planseriesbox narrow">

Open in new window

0
Comment
Question by:bbdesign
2 Comments
 
LVL 9

Accepted Solution

by:
McOz earned 500 total points
ID: 35200229
Change your plainseriesbox narrow selector to this:
div.planseriesbox .narrow { 
                width: 179px; 
        }

Open in new window

(add the dot before the second classname)
0
 

Author Comment

by:bbdesign
ID: 35200267
Ah, I see. Thank you.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question