ie 7 and below issue, absolute positioning - internet-explorer-7

for some reason in ie 7 and lower there is a huge gap in the content. I think it has to do with some jQuery I have running. the menu seems to push the content down even though its absolute position and it shouldn't be in the flow?
http://www.tigerstudiodesign.com/company-overview/
ie 7 and below: http://localhostr.com/files/yshCtut/Screen+shot+2011-09-27+at+11.08.20+AM.jpg
what it should look like:
http://localhostr.com/files/Gq1DiuR/Screen+shot+2011-09-27+at+11.08.40+AM.jpg

try this
#header {position: relative;}
#content {position: absolute; left: 0; top: 135px; height: 40px; }

Related

on Nivo 1: How can I move the bars up to start where my minValue is set? 2: How can I make the y value to show on top of the bar within a circle?

I need help with two things!
My graph has different minValues. Some of them start at like 30 (as shown in the pic)
But when the min value is above 0. The bars tend to overflow and it covers up the bottom of the graph and the ticks.
How can I make the graph start at my minValue?
I want to make the y value show on top of the bar inside a circle. (like the annotations for design purposes) Any idea how I could do that?
Here's my code.
enter code <ResponsiveBar
margin={{
top: 20,
right: 20,
bottom: 60,
left: 80
}}
data={data}
maxValue={range.max}
minValue={range.min}
keys={["y"]}
indexBy="x"
colorBy="indexValue"
padding={0.6}
axisBottom={{
tickSize: 0
}}
colors={["#00E7CB", "#929292"]}
layers={[
"grid",
refsLayer,
"markers",
"axes",
"areas",
"bars",
"slices",
"dots",
"legends"
]}
/>
Here's the picture of the code!
Thank you for your help in advance.

Codename One - transparent foreground and fonts

I have not yet found any option to provide transparency to the foreground color of a component, or to the font for that matter.
What I want to do is:
Label halfTransparentLabel = new Label("Half Transparent text");
Style s = halfTransparentLabel.getAllStyles();
s.setBgColor(0);
s.setBgTransparency(255);
s.setFgColor(0xffffff);
s.setFgTransparency(128); // this method does not exist
I know drawing translucent stuff is heavy on the performance, but I want to do it on particular pieces only. would greatly improve the visual appeal and design, having this option.
Can this be worked around?
UPDATED ANSWER
Thanks to the Shai's comment, I update my answer. The workaround I suggested is not necessary. The same result of the posted screenshot can be obtained with https://www.codenameone.com/javadoc/com/codename1/ui/plaf/Style.html#setOpacity-int- or with the opacity property in the CSS, for example:
BigLabel {
font-size: 6mm;
font-family: "native:MainRegular";
color: red;
background-color: transparent;
opacity: 0.5;
}
OLD ANSWER - Yes, it's possible to workaround this problem using the .toImage() method, as in this screenshot:
I'm not sure if this workaround is the best, however it works.
The code of this example:
Form hi = new Form("Semitransparent Example", BoxLayout.y());
hi.getToolbar().setUIID("Transparent");
hi.setUIID("FormBackground");
Container cnt = FlowLayout.encloseIn(new Label("Half Transparent Text", "BigLabel"));
// .setSize() and .revalidate(), in this case, are necessary to use the .image() method
cnt.setSize(new Dimension(hi.getContentPane().getWidth(), CN.convertToPixels(8, false)));
cnt.revalidate();
hi.add(cnt.toImage().modifyAlpha((byte) 125));
hi.show();
and the CSS:
#Constants {
includeNativeBool: true;
}
Transparent {
background-color: transparent;
}
FormBackground {
background-image: url("background.jpg");
}
BigLabel {
font-size: 6mm;
font-family: "native:MainRegular";
color: red;
background-color: transparent;
}
thanks for your answers. with the above tips, the easiest solution in code is the following:
component.getAllStyles().setOpacity(128);
so what is the benefit to use CSS?
Having the designer to all the formating and styling, I already hate to do some parts in code and some in the designer. So why make it even more complex by introducing CSS? is CSS support supposed to replace the designer?

How to prevent visual studio code from putting line breaks in my JSX?

I'm trying to set up my visual studio code to clean up or beautify my JSX/JS when coding in React.
I have several prettier formatting plugins installed. When I do 'Format Document', it makes my code look horrible.
Something nice like this:
<Map
style={{
height: "100%",
width: "100%",
margin: "0 auto"
}}
center={position}
zoom={10}>
turns into junk like this...
return ( <
Map style = {
{
height: "100%",
width: "100%",
margin: "0 auto"
}
}
center = {
position
}
zoom = {
10
} >
<
I've searched through many settings files...what is controlling this? I turned on Prettier: Jsx Bracket Same Line to be true. I set the character width to be wide. I turned off any line break things. I honestly have no idea why it's making my jsx look horribly unreadable. When I drop this same code into https://prettier.io/playground, it looks fine coming out.
What setting is putting my code onto separate lines?
This can be solved by changing the Select Language Mode from JavaScript to Javascript React in your Visual Studio code editor

img srcset + sizes picturefill for responsive

I have a site with a 12 column layout and I'm trying to figure out to use the srcset and sizes attributes correctly for matching my design.
I have a sidebox which spans 3 columns in desktop, but in tablet and mobile sizes it spans 12 cols (100% width).
What I want is for the image used in desktop-version, also to be used in mobile (max-width 480px), and a specific tablet-sized image to be used in everything between 481px and 781px.
This is my code:
<img
src="http://placehold.it/370x150/cecece"
srcset="http://placehold.it/768x311/f67f57 768w, http://placehold.it/370x150/cecece 320w"
sizes="(max-width: 768px) 100vw, (max-width: 480px) 100vw"
>
In my example, the 768 version is always used until 780px, and then the default src is used. But how does I get it to use the 320 version up until 480px?
How about this:
<img
sizes="(min-width: 781px) 370px, 100vm"
srcset="http://placehold.it/768x311/f67f57 768w,
http://placehold.it/370x311/cecece 480w"
>
It should show the smallest image up to 480px, then the large one up to 780px and the small one >780px.

Wordpress background images not showing - issue with database

There are some background images missing from my site: http://www.test.cwscambodia.org/
These include:
arrows.png (arrows on the right and left of the image slider)
sponsor_title.png (behind the the 'our supporters' text) down the bottom of the home page.
sponsor_arrows.png on each side of the 'our supporters' images at the bottom of the home page
search_bg.png which is background of the search field.
You can see how these images should look on the theme's test site: http://themes.themolitor.com/wpaid/
I have been told by the theme developer and the host that it is database problem in the wp_options table. However, I do not know which area to fix.
I have been trying to solve this issue for about 3 weeks so I would be really grateful if anyone can help me.
In the /wp-content/themes/wpaid/style.css you link to the folder /images. This folder does not exists.
example
.pxs_navigation span.pxs_prev {
left: 50%;
margin-left: -560px;
background:url(images/arrows.png) no-repeat left top;
}
.pxs_navigation span.pxs_next {
right: 50%;
margin-right: -560px;
background:url(images/arrows.png) no-repeat right top;
}
.pxs_navigation span.pxs_prev:hover {background:url(images/arrows.png) no-repeat left bottom;}
.pxs_navigation span.pxs_next:hover {background:url(images/arrows.png) no-repeat right bottom;}
In this case you will see that the arrows are linked to images/arrows.png, a folder that not exists. The good url link is /wp-content/themes/wpaid/images/arrows.png
That is the problem why you dont see all the backgrounds on your website. You can use a replace function in a text editor to change them all in one time.

Resources