user379888
user379888

Reputation:

Adding padding to the bottom

I am trying to make the the ads at the bottom of the website to be aligned with the content(i.e to have the same padding-right as the posts have.) but even after adding the it to the same div, I am unable to do so, Here is my code,

<script class="mcolumn-pad" type="text/javascript"><!--
//ad goes here
</script>

Upvotes: 1

Views: 77

Answers (3)

kmiyashiro
kmiyashiro

Reputation: 2249

It has inline CSS setting the height to 90px, yet the external CSS is probably messing with the font/line-height such that it is too tall for 90px.

#header .outline {
  margin: 0 auto;
  position: relative;
  width: 960px;
  zoom: 1;
  z-index: 15;
  height: auto !important; /* <-- add this */
}

!important is the only way to override inline styles.

Upvotes: 0

Jack
Jack

Reputation: 1472

Put your ads div in

<div id="dynamic-content" class="outline fix">

Right now its not in the same div, that's why working/showing abnormal.

Upvotes: 2

jamesmortensen
jamesmortensen

Reputation: 34038

script defines a script block for running embedded JavaScript code. You can't style the script block. However, what you can do is use a debugger like Firebug or Chrome to examine the HTML that is generated by that script block.

It looks like your script block generates some HTML with an ins element:

<div id="page-main">
    ...
    <ins style="left:180px;display:inline-table;border:none;height:90px;margin:0;padding:0;position:relative;visibility:visible;width:728px">

The ins element has no class or id attributes, but it is a child of a div that has an id attribute, so an easy way to target it with a CSS rule is as follows:

div#page-main ins {
    left:180px;
}

I'll leave it up to you to tweak the pixel value to align it as per your preference. You can move right by increasing the pixel value, and left by decreasing the pixel value.

Upvotes: 1

Related Questions