This is a migrated thread and some comments may be shown as answers.

Problem with Inline Styling

2 Answers 203 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Julien Pierre
Top achievements
Rank 1
Julien Pierre asked on 31 Jan 2012, 03:51 PM
I have defined a RadUpload control: 

<telerik:RadUpload MaxFileSize="512000" OverwriteExistingFiles="true" ControlObjectsVisibility="None"
          runat
="server" ID="RadUpload1" OnValidatingFile="uploadMedia_ValidatingFile"
          OnClientFileSelected
="uploadMedia_FileSelected" Width="500px" />

But this is rendered as: 

<span class="ruFileWrap ruStyled" style="width: 80px;" jQuery171041561896132524767="11">
   
<input class="ruFileInput" id="ctl00_MainContent_Edit1_RadUpload1file0" submitName="ctl00_MainContent_Edit1_RadUpload1file0" type="file" size="23" unselectable="on" _events="[object Object]"/>
   
<label style="display: none;" for="ctl00_MainContent_Edit1_RadUpload1file0">
   
<input class="ruFakeInput" id="ctl00_MainContent_Edit1_RadUpload1TextBox0" type="text" size="22"/>
   
<label style="display: none;" for="ctl00_MainContent_Edit1_RadUpload1TextBox0">
   
<input class="ruButton ruBrowse" type="button" value="Select"/>

You may notice the style="width: 80px;" property. That's the bit that's causing problems, it's 'cutting off' the right half of the control. I've traced the style using IE's developer tool but all it's telling me is that it's 'Inline.' Where is this styling defined? Is it possible to override the 80px?

Thanks a lot.

EDIT: Please note that this happens regardless of whether I'm setting the EnableFileInputSkinning and InputSize properties, these where just set in an attempt to solve the problem, and it didn't work. 

It's also worth mentioning that this has happened since our recent upgrade to Q3 2011 SP1.

2 Answers, 1 is accepted

Sort by
0
Julien Pierre
Top achievements
Rank 1
answered on 01 Feb 2012, 10:05 AM
Note also that this fix is needed for IE7 - so using the !important; keyword in my css file to override the width won't work.
0
Julien Pierre
Top achievements
Rank 1
answered on 01 Feb 2012, 10:40 AM
Sorted it myself. JQuery takes priority over inline styling so I included this line in pageLoad:

            //Override the rendered RadUpload control's inline CSS
            $(".ruFileWrap").css("width""230px");
Tags
General Discussions
Asked by
Julien Pierre
Top achievements
Rank 1
Answers by
Julien Pierre
Top achievements
Rank 1
Share this question
or