U.S. CitiesCity-Data Forum Index
Go Back   City-Data Forum > General Forums > Science and Technology > Internet
 [Register]
Please register to participate in our discussions with 2 million other members - it's free and quick! Some forums can only be seen by registered members. After you create your account, you'll be able to customize options and access all our 15,000 new posts/day with fewer ads.
View detailed profile (Advanced) or search
site with Google Custom Search

Search Forums  (Advanced)
 
Old 07-12-2011, 10:37 PM
 
2,182 posts, read 4,706,159 times
Reputation: 1206

Advertisements

Ok so I'm using this to make a cute little div box:

.paragraph {
width: 800px;
margin-right:auto;
margin-left:auto;
padding: 0;
border: 1px solid rgba(0,0,0,0.5);
border-radius: 20px 20px 20px 20px;
background: rgba(50,50,50,0.25);

}

Bolded part works in everything but IE......

Anyone know how to get it to work?

Thanks!!


P.S. - I have always wondered, why do people put the period in front of the style? I always have cause I've copied what I've seen...but apparently it doesn't matter when using it in a span or div or anything like that.....?





Edit: It appears to work just perfectly fine in IE9, just not 8 or lower......gah.

Last edited by kazyn; 07-12-2011 at 10:46 PM..
Reply With Quote Quick reply to this message

 
Old 07-13-2011, 01:51 AM
 
40,182 posts, read 41,790,512 times
Reputation: 16740
Quote:
Originally Posted by kazyn View Post

P.S. - I have always wondered, why do people put the period in front of the style? I always have cause I've copied what I've seen...but apparently it doesn't matter when using it in a span or div or anything like that.....?
That's how you define a class, you wouldn't want to do this but these are two separate rules.

Quote:
.p {
width: 800px;
}

p {
width: 800px;
}
It we be used to separate the class when used with an element:


Quote:
<html>
<head>
<style type="text/css">
.myclass {
color: #FF0000;
}

p.myclass {
color: #0000FF;
}

div.myclass {
color: #000000;
}
</style>
</head>

<body>
<h1 class="myclass">I'm red text</h1>

<p class="myclass">I'm blue text</p>

<div class="myclass">I'm black text</div>
</body>
</html>
Light bulb moment?
Reply With Quote Quick reply to this message
Reply
Please update this thread with any new information or opinions. This open thread is still read by thousands of people, so we encourage all additional points of view.

Quick Reply
Message:

Over $104,000 in prizes was already given out to active posters on our forum and additional giveaways are planned!

Go Back   City-Data Forum > General Forums > Science and Technology > Internet
Similar Threads
Follow City-Data.com founder on our Forum or

All times are GMT -6. The time now is 06:46 AM.

© 2005-2019, Advameg, Inc. · Please obey Forum Rules · Terms of Use and Privacy Policy · Bug Bounty

City-Data.com - Archive 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 - Top