Formatting a Dojo list item's icon - html

I'm trying to set the sizing for my list item's icon. Basically, I need to set the height and width to be 27 pixels whilst the image is actually 54 pixels wide and high. This is for use with retina graphics so that it will display properly on older and newer iPhones. Here is my code:
<ul data-dojo-type="dojox.mobile.TabBar">
<li id="footerHomeButton" class="sizing" data-dojo-type="dojox.mobile.TabBarButton"
icon1="images/new/home_icon#2x.png" onclick="WL.Page.load(INDEX.loadPage(0));">Home</li>
I have tried everything I can think of, from simple height and width tags, to CSS modifications, to Dojo sizings and nothing works. This is rather frustrating, hopefully someone else has encountered a similar problem? Why they don't include icon height and width parameters is beyond me, unless I've missed this in the documentation and you actually can?
Please help! Thanks :)

It works for me using css like below. Hope it'd help. Thanks.
img.mblListItemIcon {
height: 29px;
width: 29px;
overflow:hidden;
}

Related

HTML element not stretching to fit full screen when site is mobile

I have deployed the site here. Everything works but if you scale down the page to a mobile-size, you will notice that there is a huge space at the right side of the screen. Not sure what it is? Normally, I don't have to write posts on here because somebody has asked the same question but this time I couldn't find anything.
Hoping someone can help. The HTML doesn't extend to the full page even though its styling says for it to go to 100%. Let me know if you need any other details, really hoping someone can help.
Use below CSS and remove width: 100vw !important; from html tag
img{
max-width: 100%
}
Check screenshot https://prnt.sc/1nya57a

Full Width Banner that Doesn't Affect Viewport Size

I've been battling with this simple issue for a while and I'm looking for some help...
I'm trying to make a full width colour banner that spans the full width of the page, but doesn't in any way affect the browser viewport sizing. I want it to be visible to human eyes, but I don't want it to affect the size/location of the browser's start view or scrolling behavior... just like it's not really there.
I also want to be able to place the banner in-line in the HTML.
Here is my test page: http://www.tanatu.com/widthtest
The Green Banner works perfectly, but it's y-location is defined in CSS (which is a pain)
The Pink Banner is my best guess so far, and works as intended on Chrome, but not on Safari on iOS, where the viewport is skewed to one side
Safari iOS Positioning Issue
Correct Positioning
I've been playing with this for months so any help would be MASSIVELY appreciated! :0)
Thanks!
Because you are trying to break out of your parent container that is where your challenge is. You can do this a few ways but I think the easiest without completely changing your markup would be to use a combination of viewport width units and calc()
If you change these attributes on #widthtest4 it should work:
#widthtest4 {
width: 100vw;
margin-left: calc(-50vw + 426px);
}

CSS animating image width not working

I am working on an animated CSS3 image gallery where clicking on a picture will magnify the picture to a larger scale. However, I feel as though my initial CSS code to style the gallery before enlarging an image has enforced the width to remain the same. I have attempted to set the width on :focus parameter and custom :focus:nth-child parameters, and yet it stays the same width. I forgot to mention the height adjusts just fine with the desired px length given within the :focus method. You can find the source code on my Github Repository in the index.html file and stylesheets/image-gallery.css
My guess is that the .gallery a {... width:200px; ...} is the cause for the unchangeable width, however within the same method I am setting the height as well, so I am incredibly confused on why it is not adjusting to the desired width. Oh, and by the way, excuse the messy HTML and CSS coding, I am still in the building phase of the website and will tidy up the code later on down the road. Thank you very much for the help in advance, it will help me out a whole lot!
like this
img{
width: 200px;
transition: all .2s linear;
&:hover{
width: 400px;
}
}
<img src="http://www.placehold.it/200x200" alt="" />
Have you tried something like width:400px !important;? The !important declaration helps you to easily override properties on your css rules.

Responsive site – Layout issues when resizing the browser to a small width and then back to a large width

I’m making my first full responsive site and I have run into an issue. The site seems to be working as intended in firefox and explorer. The browsers that are giving me issues are chrome and safari.
On the bio/landing page (http://designerdsite.com/new/) toward the bottom of the page are two sections one titled “I Got Skills”, the other titled “and they love me for them”. When I load the page (no matter what size the browser width is) it loads correctly however after the browser width is shrunk and then reopened the layout repositions. In the “skills” section the div on the right side is falling below the div on the left. In the setion “they love me” the text is falling below the pictures. It seems for some reason the width on the container div is not being understood. Perhaps its something else. I am really not sure what is going on here and would very much appreciate any advice anyone has. Thank you!!
I discovered a similiar issue on my site. As far as I could figure this out, it seems that Chrome/ Webkit has a problem with the correct (re-)positioning of floated elements.
So there are 2 (maybe more) options:
1. You may use Javascript to force the Browser to re-render (not reload!!!) these elements (e.g. by changing the display property to none and back to block)
2. Use another positioning variant like 'inline-block' or 'table-cell'
Why don't you use twitter bootstrap that will make your life really easy.
it seems like you used media-query for your site right???...anyway so iguess you know the reason....for example lets assume your last media-query max width was defined as 600px ...then it will work fine upto 600px and below(not far)....when your browser is resized to width:480px (for ex.) then your design like font-size,padding etc are getting very large to fit two divs side by side....so if you want to keep your design intact for microscopic width then lets have one more media query definig that limit max-width:480px;
for example
.fonts{
font-size:18px;
}
#media screen and (max-width:480px){
.fonts{
font-size:10px;
}
}
Seems like an issue with all the percentage widths. I know WebKit can have issues with nested and rounded percentages etc, so when the page is resized both the widths on the images and quotes, as well as padding on the parent element are recalculated.
You'll see if you remove the padding: 0 5% on the max-width class, the problem no longer occurs.
Try wrapping the quotes in a 100% width div:
<div class="quote-wrapper" style="width: 100%;">
<div class="reference clear-both">
<img src="images/monica.jpg" alt="Monica" class="reference-pic">
</div>
<div class="quote">
<p><em>“Paul is the most committed hard working person I've had the pleasure to supervise. If he was unfamiliar with something he did the research to inform himself and others. Paul is one of those rare breed of people who comes to a supervisor with options not just problems.”</em></p>
<p>Monica Luchak, Former Director of Creative Services, BoardSource</p>
</div>
</div>
It has to do with how browsers compute percentages. A quick fix for that is to set a max-width for the left container:
#skills-left {
float: right;
width: 47%;
max-width:411px;
}

Background image cut off beyond viewport

Url for the unruly site: http://chrism.se
After we put it live we discovered that if the viewport is too small for the content, so as to require scrolling, the background image (body-tag, repeat-x) won't extend beyond the initial view, but I can't for the life of me figure out why and how to fix it. A note to bear in mind is that I didn't code the site by myself, since I'm not that Javascript-savvy and the designers wanted some swooshy effects. My senior colleague could surely find a remedy, but he is unfortunately away and I'd like to wrap this up.
The state of the html and css is the same as when I found out about the issue, but I've tried suggestions I've seen on similar questions, mainly revolving around min-width. I don't really understand the difference between background is only as wide as viewport? and my problem?
Full view = i.imgur.com/6aDpN.jpg
Problem = i.imgur.com/X6JVp.jpg
IE does not support min-width so you can use an expression to do the same:
body {
/* fix for most browsers, fill in desired width */
min-width: 1000;
/* IE Version, fill in desired width equal to the min-width, second value with 2px less */
width:expression(document.body.clientWidth < 1000 ? "998px" : "auto" );
}
The closest thing to a working solution I could find was to from #bodyCurrent, #bodyNext:
Remove right: 0.
Add min-width: 1349px.
Looking again, maybe that's good enough.
Tested in Firefox only, using Firebug.
I realize I'm way late to the party, but I ran into the same problem and added a min-width to the body to fix this problem. Since the link you provided still has this problem, I assume you may want more advice. The min-width of the body should be at least as wide as the viewport when horizontal scrollbars appear.
It's easier to see what's happening if you make your viewport small enough for scrollbars and use Firefox's 3D view to see the page. Then you'll see that your region-footer is set to take 100% width of the body element and that the background works fine; however, the body itself is smaller than the overflow from the top part of the page so you get that cut-off looking area when you scroll. So make the body element have a min-width as large as the overflow from the top part of the page and you'll be all set. This is a pretty common problem (I even noticed it on mailchimp for a while).
Add this to the background of div#wrapper:
background:url("../img/home.png") repeat-x scroll 0 0 #1B2E4C;
Tested it in IE7:
html, body {
position:relative;
overflow:hidden;
margin:0 auto !important;
}