Jump to content

IE 8.0: would like top and bottom padding


bulrush

Recommended Posts

I would like to put a little padding above and below a text element, but not enough for a whole line (I don't want to use <p>). PLEASE NOTE: there are multiple rows of text in this single table cell.

 

I have created a CSS class like this:

.modelnumcat {
font-style:italic;
/*padding-top:8px;
padding-bottom:8px; */
margin-top:8px;
margin-bottom:8px;
}

The style.css file is included in my html file like this:

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>Print Draft Report like Catalog v.10d</title>
  <link rel="stylesheet" type="text/css" href="style.css" />
</head>

 

I call it out like this:

<tr><td valign="top"><b>Product name goes here</b><br/>
Subname goes here<br/>
<span class="modelnumcat">34 5/8`` blah blah blah offset this text with a little space above and below</span><br/>

I have also tried using the class in a <br> tag:

<br class="modelnumcat">34 5/8`` blah blah blah offset this text with a little space above and below</br>

But it doesn't work. The italics work but not the padding. In my CSS I have tried using "padding" and "margin" but neither works. Does it matter that I am inside a table?

 

Thanks.

 

Link to comment
https://forums.phpfreaks.com/topic/212778-ie-80-would-like-top-and-bottom-padding/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.