DirtDawg
April 9th, 2006, 09:37 PM
I'm attempting to build a website using only css, which I am unfamiliar with, but learning.
I've created a few classes for pictures to make it easier on myself whenever I need to place one. A class for left, center, and right assignments as well as a caption class.
In practice, things aren't working as well as I'd like. The pic.lft and pic.cntr classes (for floating left, centered) seem to work great, but the pic.rght causes text to appear way out of whack.
Please see what I'm talking about here:
http://www.weeklyhilarity.com/csshelp/home.html
I've scoured my code but can't find any problems. I thought perhaps Firefox was screwing up, but the same thing happens in Opera. I think what it comes down to is a lack of understanding, on my part, of how css works.
I've also checked google, but finding info on this particular problem is difficult, to say the least. I know there's likely an html forum, but I like you guys better and thought maybe I could pick your brain.
Any help would be appreciated, Thank you.
Below is the relevent css code, though the entire file can be found here:
http://www.weeklyhilarity.com/csshelp/master.css
#pic
{
border: 0;
padding-left: 3px;
padding-right: 3px;
padding-bottom: 0px;
padding-top: 3px;
}
#pic p
{
text-align: center;
font-style: italic;
font-size: smaller;
color: #00aeed;
}
#pic.cntr
{
display: block;
margin-left: auto;
margin-right: auto;
}
#pic.lft
{
float: left;
padding-right: 7px;
}
#pic.rght
{
float: right;
padding-left: 7px;
}
EDIT: Fixed broken links
I've created a few classes for pictures to make it easier on myself whenever I need to place one. A class for left, center, and right assignments as well as a caption class.
In practice, things aren't working as well as I'd like. The pic.lft and pic.cntr classes (for floating left, centered) seem to work great, but the pic.rght causes text to appear way out of whack.
Please see what I'm talking about here:
http://www.weeklyhilarity.com/csshelp/home.html
I've scoured my code but can't find any problems. I thought perhaps Firefox was screwing up, but the same thing happens in Opera. I think what it comes down to is a lack of understanding, on my part, of how css works.
I've also checked google, but finding info on this particular problem is difficult, to say the least. I know there's likely an html forum, but I like you guys better and thought maybe I could pick your brain.
Any help would be appreciated, Thank you.
Below is the relevent css code, though the entire file can be found here:
http://www.weeklyhilarity.com/csshelp/master.css
#pic
{
border: 0;
padding-left: 3px;
padding-right: 3px;
padding-bottom: 0px;
padding-top: 3px;
}
#pic p
{
text-align: center;
font-style: italic;
font-size: smaller;
color: #00aeed;
}
#pic.cntr
{
display: block;
margin-left: auto;
margin-right: auto;
}
#pic.lft
{
float: left;
padding-right: 7px;
}
#pic.rght
{
float: right;
padding-left: 7px;
}
EDIT: Fixed broken links