Search Results

Search found 11623 results on 465 pages for 'css positioning'.

Page 40/465 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • CSS Sprite for images which have vertical as well as horizontal repeats

    - by Rachel
    I have four images, one of which has background repeat property in horizontal direction and three of which have background repeat in vertical direction. I have different CSS classes which currently uses this images as under: .sb_header_dropdown { background: url(images/shopping_dropdown_bg.gif) repeat-y top left; padding: 8px 3px 8px 15px; } .shopping_basket_dropdown .sb_body { background: url(images/shopping_dropdown_body_bg.png) repeat-y top left; margin: 0; padding: 5px 9px 5px 8px; position: relative; z-index: 99999; } .checkout_cart .co_header_left { background: url(images/bg.gif) repeat-x 0 -150px; overflow: hidden; padding-left: 3px; } .sb_dropdown_footer { background: url(images/shopping_dropdown_footer_bg.png) repeat-y top left; clear: both; height: 7px; font-size: 0; } So here am making 4 HTTP Request and I want to implement CSS Sprite for all 4 images such that I can reduce the number of HTTP Request from 4 to 1, also thing to keep in mind is that here we have background repeat for all 4 images, either on x-direction or on y-direction and so how should sprite be created and how it can be used in the CSS to reduce the number of HTTP request. I hope this question is clear.

    Read the article

  • CSS H4 hover style

    - by user1750613
    I tried many css from other places and stackoverflow, but somehow I can not make it done. I'm very new to css, and using Joomla and a template. I'm using custom.css folder for certain customizations on style. Here is I want to do: I want to style h4 when it is a link. For example, I'm creating a custom html module, have a list in the content. And in the content I'm giving each, h5 style, and a link to it to a certain page in the site. What I want to achieve is to have this list with color blue. And when mouse over-hover to have underline and still the same color. And when clicked back to the original position with no underline and no color change. (the same color in every situation, just underline when you are over it.) I tried these h5, h5 a, h5 a: hover, h5 .contentheading a, and so on... In one instance, it was working with : h5 { font-family: arial, sans-serif; font-size: 1.3em; font-weight: bold; } h5 a { color: #0088CC; } h5 a: hover { color: #0088CC; text-decoration: underline; } As I read I should use 'a' when the heading is a link. But now something is overriding it, I'm completely lost now. I see a:hover style in the inspection. I want to use this h5 in several content (in custom modules) when I want to style a content as a list to links. And I thought it will be practical to have one heading with a certain style so that I can use it with flexibility. Thanks a lot, any help will be great : )

    Read the article

  • Overriding CSS style 'display:none' in javascript

    - by jsarma
    I'm trying to add a checkbox toggle that hides and shows list elements by changing their style display attribute from "none" to "inline", but it's not working. I'm setting the attribute's style to "display:none" in the CSS file. Then I set it to "display:inline" in javascript when someone checks a box. The javascript is successfully changing the element's property to inline, but for some reason the element remains invisible. If I do the opposite, by setting the display to inline in the CSS and overriding it to none in the javascript, it works fine. I don't see why this would work one way but not the other. I'm using chrome. Here is the code. Any feedback is appreciated. CSS file: #tabmenu li[status='disabled'] a, a.active, #disabled { color: #777777; background: #DDDDDD; font: normal 1em Arial; border: 1px solid black; border-radius: inherit; padding: 0px 5px 0px 5px; margin: 0px; text-decoration: none; cursor:hand; display:none; } HTML: <ul id="tabmenu"> <li name='tab' id='tab1' selected='no' status='disabled'></li> </ul> JAVASCRIPT (from command line, or onchange of a checkbox) tab = document.getElementById('tab1'); tab.style.display = 'inline';

    Read the article

  • Basic CSS question regarding background images for divs

    - by Mike
    I'm a programmer trying to learn some css and I've already run into a stumbling block. I have the following HTML: <div class="container"> <div class="span-24 last"> Header </div> <div class="span-4"> Left sidebar </div> <div class="span-16"> <div class="span-8"> Box1 </div> <div class="span-4"> Box2 </div> <div class="span-4 last"> Box3 </div> <div class="span-16 last"> Main content </div> </div> <div class="span-4 last"> Right sidebar </div> <div class="span-24 last"> Footer </div> </div> In my css I have the following: body { background-color:#FFFFFF; } div.container { background:url(/images/bck.jpg); } I just want to display an image for the background area for the container div but nothing shows up. If I remove the background section from the css and add background-color:#000000; then I see a black background for the container div. What am I overlooking?

    Read the article

  • Overriding CSS properties for iframe width

    - by user2898989
    I'm trying to put an iframe into a webpage, but no matter what I try to put in either the iframe properties or the custom CSS section of the website builder (or how many times I try to add !important to anything from width to right-margin), I can't get the iframe to extend rightward further than the page's preset width. Here's an example of the page and iframe that I'm working with: http://fmlcapitalinvestment.com/Search_Properties.html I need that script/iframe to be wide enough to show the search area. It seems pointless to copy and paste code and attributes I've tried setting, because nothing I do seems to have any effect, but just for showing how much I have no idea what I'm doing, here's my iframe code: <iframe id="idxFrame" style="padding:0; margin:0; padding-top: 0px; overflow-x:auto; width:1000px!important; border:0px solid transparent; background-color:transparent; max-width:none!important; right-margin:-200px!important" frameborder="0" scrolling="on" src="http://www.themls.com/IDXNET/Default.aspx?wid=8MSsp7Pf9eI55yjkDuB%2blX5awn7LnnVXh5PNYhq2ImAEQL" width="1200px" height="900px"></iframe> The "Website Builder" that I'm forced to use to make these kinds of pages is infuriating, but it does have a "Custom CSS" area where I can input additional CSS information. Is there something I could generically use to set iframes to their own widths?

    Read the article

  • CSS: "AND" and + operator?

    - by de.vina
    I want to put a space after all the headers using CSS. Like this: if h1 = add a space after else if h1 + h2 = add a space after also but no space in between This is my HTML code <article> <h1>Title 1</h1> ... </article> <article> <h1>Title 1</h1> <h2>Title 2</h2> ... </article> For the CSS h1, h2 { padding-bottom: 20px; } The problem is, there is a space also between h1 and h2. I tried this code below but only those articles with h1 and h2 have a space after. h1 + h2 { padding-bottom: 20px;} Is there a way to do this? Or I should just use the h1 + h2 in CSS and add < br for h1 only?

    Read the article

  • CSS div and image opacity effect

    - by user1704514
    The following code shows the image in the div tag. <div class='item'> <img class='img' src="image1.png" alt="" /> </div> I am using the following css to add effects to the html image code: img{ width:50px; height:50px; opacity:0.4; filter:alpha(opacity=40); } img:hover{ opacity:1.0; filter:alpha(opacity=100); } I am using this to have opacity effects in css. With this code, the opacity effect works well when I hover over the image itself. But how do I make it so that the opacity effect on the image occurs when I hover over the div tag instead. I want to be able to hover over any part of the item div which encapsulated the image, to get the change opacity effect on the image. NB effect on just the image not the entire div. Can this be done in css? If so how?

    Read the article

  • Page specific CSS or a single css file when developing a mobile (webkit) based site?

    - by Mike
    I am working on a mobile site for webkit browsers. I have been trying to find information on using multiple style sheets versus a single css file. There is a lot of information on this topic, but it not a lot of information pertaining to mobile browsers. My site will have a bunch of pages that while have page specific css. For a non-mobile site, it seems like generally people say that a single file will be faster, but that multiple files are easier to develop. However, on a mobile site is that still the case? If you put everything in one file, that will get cached after load, but that will make the first load slower. If you had page specific files, the first page would get loaded quicker, but every other page would then take a hit while making the page specific css http request. Does anyone have any thoughts on this? It sounds like they are saying one file is better as long as its under 1 MB (which my files def will)? http://www.yuiblog.com/blog/2010/07/12/mobile-browser-cache-limits-revisited/

    Read the article

  • CSS challenge: Two background images, centered column with fixed with, min-height 100%

    - by laurent
    In a nutshell I need a CSS solution for the following requirements: Layout: One centered column with fixed width and a minimum height of 100% Two vertically repeated background images behind the centered column, one aligned to the left, one aligned to the right Cross browser compatibility A little more details Today a new requirement for my current web site project came up: A background image with gradients on the left and right side. The challenge is now to specify two different background images while keeping the rest of the layout spec. Unfortunately the (simple) layout somehow doesn't go with the two backgrounds. My layout is basically one centered column with fixed width: #main_container { margin: 0 auto; min-height: 100%; width: 800px; } Furthermore it's necessary to stretch the column to a minimum height of 100%, since there are quite some pages with only little content. The following CSS styles take care of that: html { height: 100%; } body { margin: 0; height: 100%; padding: 0; } So far so good - until the two background image issue arrived... I tried the following solutions Two absolute positioned divs behind the main container One image defined with the body, one with the html CSS class One image defined with the body, the other one with a large div begind the main container With either one of them, the dynamic height solution was ruined. Either the main container didn't stretch to 100% when it was too small, or the background remained at 100% when the content was actually longer

    Read the article

  • How to occupy all the space in a div when working with min-height header / footer

    - by javacoder
    I believe this is a beginner's CSS question. I am utilizing the method described in http://www.xs4all.nl/~peterned/examples/csslayout1.html to fix a header to the top and a footer to the bottom. What I'd like to achieve now is two columns inside the content div. A left one of 200px and a right one that takes up the rest of the width. Unfortunately, I can't get the left and right divs to display correctly: they just don't grow vertically, and if I make the right div "width: 100%" it positions itself underneath the left one. What is the trick to make the left and right div take up all the space within the content div? The layout1.css is the original one. I just added two entries: #left and #right layout1.css: /** * 100% height layout with header and footer * ---------------------------------------------- * Feel free to copy/use/change/improve */ html,body { margin: 0; padding: 0; height: 100%; /* needed for container min-height */ background: gray; font-family: arial, sans-serif; font-size: small; color: #666; } h1 { font: 1.5em georgia, serif; margin: 0.5em 0; } h2 { font: 1.25em georgia, serif; margin: 0 0 0.5em; } h1,h2,a { color: orange; } p { line-height: 1.5; margin: 0 0 1em; } div#container { position: relative; /* needed for footer positioning*/ margin: 0 auto; /* center, not in IE5 */ width: 750px; background: #f0f0f0; height: auto !important; /* real browsers */ height: 100%; /* IE6: treaded as min-height*/ min-height: 100%; /* real browsers */ } div#header { padding: 1em; background: #ddd url("../csslayout.gif") 98% 10px no-repeat; border-bottom: 6px double gray; } div#header p { font-style: italic; font-size: 1.1em; margin: 0; } div#content { padding: 1em 1em 5em; /* bottom padding for footer */ } div#content p { text-align: justify; padding: 0 1em; } div#footer { position: absolute; width: 100%; bottom: 0; /* stick to bottom */ background: #ddd; border-top: 6px double gray; } div#footer p { padding: 1em; margin: 0; } // added the following: div#left { border: 1px solid red; width: 200px; float: left; min-height: 100%; height: 100%; padding-left: 10px; margin-right: 10px; } div#right { border: 1px solid blue; float: left; min-height: 100%; height: 100%; padding-left: 10px; margin-right: 10px; } layout.html: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>CSS Layout - 100% height</title> <link rel="stylesheet" type="text/css" href="layout1.css" /> </head> <body> <div id="container"> <div id="header"> <h1>header</h1> </div> <div id="content"> <div id="left"> left column </div> <div id="right"> right column </div> </div> <div id="footer"> <p> footer </p> </div> </div> </body>

    Read the article

  • Forcing images to not wrap

    - by Mohammad
    I can't touch the html theme but I have access to the css files. <div class="photos"> <img src="a.jpg" alt="" align="left" /> <img src="b.jpg" alt="" align="left" /> <img src="c.jpg" alt="" align="left" /> //align makes the images wrap </div> Unfortunately I can't remove align="left" from the images otherwise this CSS snippet would have done the job .photos{ white-space: nowrap; } .photos img{ display: inline; vertical-align: top; } Any ideas? Is it even possible to make these images line-up horizontally without using the force of a table and only with CSS? Many Thank in advance!

    Read the article

  • The weirdest css issue I have ever seen

    - by jasondavis
    Below I have 2 css codes for a div, please note that the first one does not even have a div on the page or ANYTHING with it's name on it. I can also rename it to anything. Now where the weird part comes in. The second bit of code below has a width of 520px, the only way that the div on the page will be 520px is if I leave the css code thats above that one, the 1st one with no existing div on the page HAS to be on the page for the second css code to work, At first I thought it has to be a browser caching issue, so I clear my cache and that does nothing, I then try 2 other browsers and they all have the same result. I add the 1st bit of code into the page and the second bit works, I take the first bit away and the second bit does not work. AM i overlooking something here? .commentwrappsdfsde2{width:950px;margin:0 0;padding:0;} .commentwrapper{width:520px;margin-right:auto;margin-left:auto;} Here is the whole page code <style> <!-- css for user photos--> div.imageSub img.female { border-top: 1px solid #FF3399; } div.imageSub img.male { border-top: 1px solid #3399FF; } div.imageSub img { z-index: 1; margin: 0; display: block; } div.imageSub div { position: relative; margin: -15px 0 0; padding: 5px; height: 5px; line-height: 4px; text-align: center; overflow: hidden; font-family:Trebuchet MS,Helvetica,sans-serif; font-size:12px; font-weight: bold; } div.imageSub div.blackbg { z-index: 2; background-color: #000; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; filter: alpha(opacity=70); opacity: 0.5; } div.imageSub div.label { z-index: 3; color: white; } <!-- end photo block--> /* Comments */ .commentwrappsdfsde2{width:950px;margin:0 0;padding:0;} .commentwrapper{width:520px;margin-right:auto;margin-left:auto;} #comments ol.commentlist li { list-style-type:none; padding:20px; background:none; } #comments ol.commentlist li.thread-even { background:#f6f6f6; border-top:1px solid #e3e3e3; border-bottom:1px solid #e3e3e3; } #comments ul.children li ul.children,#comments .commentlist{padding:0;} </style> <div class="commentwrapper"> <div id="comments"> <ol class="commentlist"> <li class="comment thread-even " > Comment 1 </li> </ol> </div> </div>

    Read the article

  • How to set width of parent div in css

    - by Marcin Wiankowski
    I am using vaadin in combination with navigator7 addon. In header and footer there are spacings between conponents That i would not have. I tried to remove the spacings using setSpacing(false) for header and footer component but it is not working probably becouse of the addon. So i tried to solve this using css. The sample below i a test output html that vaadin generates: <!DOCTYPE html> <html> <head> <style type="text/css"> div div .footer-label, .footer-label{ color: green; width: 100px !important; } </style> </head> <body> <div class="my-footer"> <div> <div style="color: red; height: 20px; width: 482px; overflow: hidden; float: left; padding-left: 0px; padding-top: 0px; background-color:yellow;"> <div style="float: left; margin-left: 0px;"> <button class="footer-label" style="width: 400px;">Text</button> </div> </div> </div> </div> </div> </body> </html> There is a button inside div div. I would like to make the width of root div to have exact same width as the button. I ended with this css code but it does not work. The root div stays in its 482 pixels width. div div .footer-label, .footer-label{ color: green; width: 100px !important; } Is it possible to do something like that in css and how to do it? Or how to solve this using problem using Vaadin? Vaadin Code public class MyAppLevelWindow extends HeaderFooterFixedAppLevelWindow { @Override protected Component createHeader() { ... } @Override protected Component createFooter() { HorizontalLayout myFooter = new HorizontalLayout(); akmedFooter.setSpacing(false); akmedFooter.setStyleName("my-footer"); NativeButton sendProblemButton = new NativeButton("Button"); sendProblemButton.setStyleName("footer-label"); akmedFooter.addComponent(sendProblemButton); ..... return akmedFooter; } ............. } Answer .my-footer div div{ width: auto !important; }

    Read the article

  • CSS menu items flickering in IE6

    - by Quick Joe Smith
    Edit #1: I have just discovered this flicker bug affects IE8 (and therefore most likely IE7) as well. I am putting together a pure-CSS dropdown menu (mostly a learning exercise) and have hit a point in IE where the submenu items are flickering as the mouse moves around within the <li> but outside the inner <a>. Source code is as follows: The included csshover3.htc is downloadable from Peter Nederlof's page for Whatever:hover <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>CSS Menu</title> <style type="text/css"> body { behavior: url("csshover3.htc"); } div#navbar { background-color:#333; font-size:1.4em; overflow:auto; } div#navbar ul { display:inline-block; /* ie6 float container bug */ list-style:none; margin:0px; padding:0px; } div#navbar ul.menu li { float:left; display:inline; /* ie6 double-margin bug */ } div#navbar ul.menu a { display:block; text-decoration:none; color:#fff; padding:5px 10px; } div#navbar ul li a:link, div#navbar ul li a:visited { text-decoration:none; } div#navbar ul li a:hover { color:#333; background-color:#f6c323; } div#navbar ul.menu ul { display:none; } div#navbar ul.menu li:hover ul { display:block; position:absolute; background-color:#333; } div#navbar ul.menu li:hover ul li { float:none; } div#navbar ul.menu li:hover ul ul { display:none; } div#navbar ul.menu li:hover li:hover { position:relative; } div#navbar ul.menu li:hover li:hover ul { display:block; position:absolute; left:100%; top:0; } </style> </head> <body> <h1>CSS Menu</h1> <div id="navbar"> <ul class="menu"> <li><a href="#">A</a></li> <li> <a>B</a> <ul> <li><a href="#">123</a></li> <li><a href="#">2</a></li> <li> <a>Tweee</a> <ul> <li><a href="#">Phwoar</a></li> <li><a href="#">Gr</a></li> </ul> </li> </ul> </li> <li><a href="#">C</a></li> </ul> </div> </body> </html> Live demo: http://jsfiddle.net/4q6Vw/ Any help is appreciated.

    Read the article

  • understanding logic of dijit css and styles

    - by Tom
    Hi, I am trying to use dijit.InlineEditBox. I have put the following code in my HTML, using the example in the dojo docs: <script type="text/javascript"> dojo.require("dijit.InlineEditBox"); dojo.require("dojo.parser"); dojo.require("dijit.form.TextBox"); function editableHeaderOnChange(id, arg){ alert("details changed with id " + id + " and arguments "+arg); } </script> ... <span id="myText" dojoType="dijit.InlineEditBox" onChange="editableHeaderOnChange(this.id,arguments[0])" autoSave="true" title="My Text">click to edit me</span> I am using tundra theme. It works, however it doesn't look so good. The widget has its own style, which doesn't fit my CSS. I used firebug to locate the source of the problem. The widget creates many nested div/span elements, each has it's own style (element style in firebug): <span id="dijit__InlineEditor_0" class="dijitReset dijitInline" style="margin: 0px; position: absolute; visibility: hidden; display: block; opacity: 0;" ...> <input type="text" autocomplete="off" class="dijit dijitReset dijitLeft dijitTextBox" id="dijit_form_TextBox_0" style="line-height: 20px; font-weight: 400; font-family: Trebuchet MS,Helvetica,Arial,Verdana; font-size: 14.5167px; font-style: normal; width: 100%;"> ...> </span></span> (showing only the relevant parts...) to get the visual that I want, which will not break to a newline, I need to change the width of dijit_form_TextBox_0** to 50%, and the positioning of dijit__InlineEditor_0 to display: inline**; or to change the positioning of everything (most of my layout is floated, so position: absolute doesn't fit) I cannot address those span elements in my css to change the properties, because the element.style has priority, of course. I don't understand the logic in this system... why is dijit generating the style directly inside the element? how can I change these properties? Thanks Tom

    Read the article

  • CSS Multi-Column Forms in HTML/ASP.NET

    - by Caveatrob
    I've researched for hours and still haven't found a robust, non-absolute-positioning solution for displaying multiple-column forms and values without using TABLE tags. Can someone point me to a resource specifically oriented towards reproducing table-based, multiple-column forms (like name and address forms) in CSS to standards? Most of the forms I see only have a single column with field/value.

    Read the article

  • fragment shader directional light positioning with camera

    - by meWantToLearn
    Im trying to set up directional lighting in the fragment shader. So the direction of my light moves with the camera position. #version 150 core uniform sampler2D diffuseTex; uniform vec4 lightColour; uniform vec3 lightDirection; vec3 LNorm = normalize(lightDirection); vec3 normal = normalize(IN.normal); vec3 calColour = lightColour[i].rgb * intensity; gl_FragColor = vec4(diffuse.rbg * calColour, diffuse.a); It lights the entire scene.

    Read the article

  • XNA - positioning after rotation

    - by DijkeMark
    I have a turret with a 2 gunbarrels. The turret rotates towards my mouse. So far no problem. When it creates a few bullets and positions them at the end of the gun barrels. Here is the problem. It only works the moment the gun is point upwards. The moment it rotates the end of the gun barrels have moved ofcourse, thus the bullets don't spawn at the end of the gun battels, but at the place the where the gun barrels are when the turret is pointing upwards. How can I check where the end of the gun barrels are the moment it rotates? Thanks in Advance, Mark Dijkema PS. If you need code please let me know, I didn't post any yet, because I didn't what code you would need.

    Read the article

  • Does CSS Positioning Affect SEO [duplicate]

    - by etangins
    This question is an exact duplicate of: Make Offscreen Sliding Content Without Hurting SEO [duplicate] If I positioned the very first content that appears in my code below the fold, would that content be given less weight and therefore be less effective with SEO? In addition, if I had a large image that took up most of the top of the screen and resulting in my content being below the fold or toward the bottom of the screen, would that content be given less weight? Note This is content that occurs early on in my code. I'm not talking about having a ton of content and if the content that occurs later would be given less weight, but if content that occurs early on put ends up below the fold would be given less weight.

    Read the article

  • Drawing chunks, and positioning the camera

    - by Troubleshoot
    I've seen many questions and answers regarding how to draw tiled maps but I can't really get my head around it. Many answers suggest either loading the visible part of the map, or loading and unloading chunks of the map. I've decided the best option would be to load chunks, but I'm slightly confused as to how this would be implemented. Currently I'm loading the full map to a 2D array of buffered images, then drawing it every time repaint is called. Q1: If I were to load chunks of the map, would I load the map as a whole then draw the necessary chunk(s), or load & unload the chunks as the player moves along, and if so, how? My second question regards the camera. I want the player to be in the centre of the X axis and the camera to follow it. I've thought of drawing everything in relation to the map and calculating the position of the camera in relation to the players coordinates on the map. So, to calculate the camera's X position I understand that I should use cameraX = playerX - (canvasWidth/2), but how should I calculate the Y position? I want the camera to only move up when the player reaches cameraHeight/2 but to move down when the player reaches 3/4(cameraHeight). Q2: Should I check for this in the same way I check for collision, and move the camera relative to the movement of the player until the player stops moving, or am I thinking about it in the wrong way?

    Read the article

  • Why Web Search Engine Positioning Can Make Your Business Succeed

    The internet offers businesses a worldwide marketplace where they can make their services and products available to potential customers. As a matter of fact, the rampant internet connection and advancement in technology has ensured that millions of people around the world visit the internet and access various sites. Marketing and promotion of a business is vital, if it has to be successful and compete effectively with other competitors.

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >