views:

91

answers:

1

In my custom .master page I have the following code:

<asp:ContentPlaceHolder id="PlaceHolderMain" runat="server" Visible="true" />

This prints out the main content of my page. It contains this structure

<table ID="OuterZoneTable" width="100%">
    <tr>...</tr>
    <tr id="OuterRow">
        <td width="80%" id="OuterLeftCell">...</td>
        <td width="180" id="OuterRightCell">...</td>
    </tr>
    ...
</table>

I want to control the width of #OuterLeftCell and #OuterRightCell but it is hard-coded in the html that is returned. How would I change these values?

A: 

You should be able to easily override the inline settings via CSS. For example, here is the equivalent CSS for the current inline settings (define in the HEAD section of your page, via your .master or a page layout):

<style type="text/css">
    #OuterZoneTable {
        /* Control overall table width */
        width: 100%;
    }

    #OuterLeftCell {
        width: auto;
    }

    #OuterRightCell {
        width: 180px;
    }
</style>

Now if you wanted to make both cells take up half the available space, you'd change their definitions both to be width:50%. Hope this gets you started in the right direction.

CBono
Sadly does not seem to be working. I imagine the in-line width takes a higher precedence than CSS.
Linda
Try adding !important to the CSS declarations. Example: `width: 50% !important;`
CBono