Jump to content

IE 8.0: would like top and bottom padding


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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.