My website is responsive, but my background image keep stretch longer than screen (or browser) which make browser has scroll bar on the bottom because of an extra portion width to the right? My main contents are responsive. So this extra portion just background image.
If i added "background-repeat: no-repeat;" then there is still extra white color portion to the right which still make it extra that has scroll bar
If i removed the background image, there is also an extra white portion stretch to the right the same.
Here is my style.css
html {
-webkit-font-smoothing: antialiased;
text-rendering:optimizeLegibility;
}
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
color: black;
background: url(../images/wood_background.jpg);
}
you can adjust the width using
Example:background:size:100% 100%
You can adjust the percentage so that your image is adjusted accordingly
Related
I have a problem with the navigation bar color in android 13, when I set it to white the button remain white so they are not visible. Any solution to that in Kotlin? Can the button color in the navbar?
The color is set in themes.
Also I found some answers, either it's outdated or it does not work for me.
add this to themes.xml
<item name="android:navigationBarColor">#color/navigation_bar_color</item>
colors.xml
<color name="navigation_bar_color">#000000</color>
Or in style, you can also change the navigation bar colour
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<item name="android:navigationBarColor">#android:color/white</item>
</style>
I'm struggling with an Android theme issue with text fields. There's too much padding above/below so that I have to set the TextFields to be very tall in order to see the text within.
In this shot, the "1" is a Label in the box above; the green text cursor is pointing to a little black dot -- that's the text inside a text field (borders added for clarity here). The field is so tall you can't see its text. My layout calls for these text fields to be pretty close together so I can't just make things taller so that the text field fits. I need to remove that padding.
ektheme.xml:
<style name="EKTheme" parent="#style/Theme.AppCompat.NoTitleBar">
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:editTextStyle">#style/EditTextEKTheme</item>
</style>
ekstyles.xml:
<style name="EditTextEKTheme" parent="#android:style/Widget.EditText">
<item name="android:background">#ffffff</item>
<item name="android:paddingLeft">8dp</item>
<item name="android:paddingRight">8dp</item>
<item name="android:paddingTop">2dp</item>
<item name="android:paddingBottom">2dp</item>
<!-- also tried with
<item name="android:padding">2dp</item>
-->
</style>
styles file:
"#qty":{
height: 35,
left: 0,
hintText: '',
color: '#000',
font: {
fontSize: 12,
fontWeight: 'normal'
},
keyboardType: Ti.UI.KEYBOARD_TYPE_NUMBER_PAD,
verticalAlign: Ti.UI.TEXT_VERTICAL_ALIGNMENT_BOTTOM
}
I know this xml theme is being applied because without the android:background = #fff I get the standard underline in the fields. But, the padding is having no effect. I have also tried setting android:layout_height which again has no effect.
Here's a shot of a different field elsewhere in the app (with slightly different styling) that shows how tall the fields are. The green underline shows the field has focus.
Edit to note that I'm using SDK 5.5.2.GA
In mediaroom PF application how can we change the font. in below code
<mrml:TVLabel ID="value1" runat="server" **FontStyle="reg16"**
Foreground="argb(255,235,235,235)" Padding="rect(10,0,0,0)"
style="position: absolute; top: 45px; left: 0px; height: 88px; width: 250px;"
Text="-" >
You can't. All you can do is use the predefined fonts available already on the STB/Simulator. The full list is in the files Styles.xml and Skin.xml.
You can find the definition like this:
<!-- FONTs in the system -->
<constant name="TVReg" value="fonts/SegoeAltMRSB.ttf"/>
<constant name="TVBold" value="fonts/SegoeAltMRB.ttf"/>
<constant name="TVItalic" value="fonts/SegoeAltMRSBI.ttf"/>
<constant name="TVBoldItalic" value="fonts/SegoeAltMRBI.ttf"/>
<constant name="TVHeader" value="fonts/SegoeAltMRB.ttf"/>
And them a lot of styles like that:
<font styleName="Bold16" fontFace="#TVBold" fontSize="16"/>
I want to make a sleek looking thin appbar. Is it possible?
Setting Height and MinHeight work for me:
XAML:
<AppBar Height="25" MinHeight="25"> ... </AppBar>
HTML/CSS:
.win-appbar.sleek {
height: 25px;
min-height: 25px;
}
<div id="sleekAppBar" data-win-control="WinJS.UI.AppBar" class="sleek"
data-win-options=""> ... </div>
Let's think about this differently.
Why keep the AppBar the same size? The reason is, your application will visually align to the rest of the Windows 8 ecosystem. I am not saying yo can't change the AppBar; I'm just saying you had better have a good reason.
How to customize the AppBar? Here's my whole blog on the topic: http://blog.jerrynixon.com/2012/10/walkthrough-windows-8-appbar-you-might.html
i am developing a Windows 8 "Metro" App. In this App I want to put an Image as a wallpaper.
The Image is 1600x900 Pixels big. Now, when i try a bigger Screen in the Simulator the Image
is not scaled to fill the whole Screen. How can i achieve this? I tried to follow the Microsoft
Guidelines for different Screen sizes, like for example putting the Image in a canvas, but it doesnt
work. Can someone help me?
Thank you very much
I am not sure what exactly what you have tried, or which guidelines your were looking at. But you can always add an ImageBrush to your Grid like this.
<Page
x:Class="App3.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App3"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid>
<Grid.Background>
<ImageBrush ImageSource="Assets/img101.jpg"/>
</Grid.Background>
<TextBlock Name="txt1" HorizontalAlignment="Center" VerticalAlignment="Center" Text="Hello World" FontFamily="Arial" FontSize="60" ></TextBlock>
</Grid>
</Page>
In one of my apps, I use a full-screen image as a background watermark, by using the following CSS:
.watermark {
position: absolute;
z-index: -1;
width: 100%;
height: 140%;
opacity: 0.05;
}
then, in the markup, I simply add an image tag, with the watermark class:
<img class="watermark" src="#" />
In my case, I'm setting the image source dynamically in the page's JS file, like so:
element.querySelector(".watermark").src = item.maptileUrl;
the above line grabs the URL for the image (a map tile) from the selected item that was passed to the page.
I tested my app in the simulator, and it works regardless of the screen size and resolution.
Be aware that depending on what your image is, using a width/height of 100% could result in your image being stretched vertically or horizontally.
Another possibly easier solution is to simply set the background-image style of the body tag to the desired image. You can read more about this property at http://www.w3schools.com/cssref/pr_background-image.asp (along with the background-repeat, background-size, etc.).