Search Results

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

Page 6/465 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Putting Images Inside a BUTTON Element (HTML & CSS)

    - by Jimbo
    I have a simple button (as shown below) on which I need to display two pictures, one on either side of the button text. Im battling to create the CSS that will work in both Firefox and Internet Explorer! (the button images are coming from a JQuery UI skin file) CSS button div{ width:16px; height:16px; background-image: url(images/ui-icons_d19405_256x240.png); } button div.leftImage{ background-position: -96px -112px; float: left; } button div.rightImage{ background-position: -64px -16px; float: right; } HTML <button><div class="leftPic"></div><span>Button Text</span><div class="rightPic"></div></button>

    Read the article

  • CSS just for most basic HTML

    - by Gerenuk
    I've read that my note system Wikidpad, which exports to very simple HTML, can use CSS (http://wikidpad.sourceforge.net/help/HtmlCss.html) The elements in the output are not more than basic headings, bullet points and tables. I'd like to try some kind of improved style, but I as I have no knowledge about CSS, so the best I can do is to save some Myfile.css to a directory :) However if I google "CSS template" I get all sorts of complicating results that I cannot make sense of :( Am I using wrong terminology? Can you suggest what I should search for or maybe you even know a ressource where a get a simple CSS file with some decent standard HTML elements. I do not wish to make custom adjustments.

    Read the article

  • css problem lining up some icons...

    - by Ronedog
    I'm having a problem lining up some icons and am new enough to css that I'm not exactly sure how to explain this. So I've attached a picture of what the out put is rendering like. I've also included what the css and html code is. Hopefully someone can help point me in the right direction to help fix this. I want the "edit", "archive", "delete" icons to all line up in the right side exactly the same as the first row in the picture. Here is the html: <ul id="nav"> <li>California <div class="portf_edit"> <span> <img src="../images/edit.png"> </span> </div> <div class="portf_archive"> <span> <img src="../images/archive.png"> </span> </div> <div class="portf_delete"> <span> <img src="../images/delete.png"> </span> </div> </li> <li>Hyrum <div class="portf_edit"> <span> <img src="../images/edit.png"> </span> </div> <div class="portf_archive"> <span> <img src="../images/archive.png"> </span> </div> <div class="portf_delete"> <span> <img src="../images/delete.png"> </span> </div> </li> Here is the css: li { list-style-type:none; vertical-align: bottom; list-style-image: none; left:0px; text-align:left; } ul { list-style-type: none; vertical-align: bottom; list-style-image: none; left:0px; } ul#nav{ margin-left:0; padding-left:0px; text-indent:15px; } .portf_edit{ float:right; position: relative; right:50px; display:block; } .portf_archive{ float:right; position: relative; right:-5px; display:block; } .portf_delete{ float:right; position: relative; right: -60px; display:block; } Here's what is being output: Any ideas where to start? Thanks.

    Read the article

  • Vertically split variable-sized div using CSS

    - by Martijn
    I'm trying to divide an auto-scaling div into two vertically using two other div's. What I have so far: <div id='wrapper'> <div id='left'>some stuff</div> <div id='right'>more stuff</div> </div> with #frame { position: static; width: 1000px; height: auto; /* more positioning stuff */ } #left { position: absolute; width: 200px; height: 100%; } #right { position: static; margin-left: 200px; } This seems to work OK, except if the contents of #right are higher than those of #left. In this case, part of the contents of left are invisible. How can I make sure that the height of the left div is also taken into account when the needed height of #wrapper is calculated?

    Read the article

  • Cannot position Google +1 button with CSS?

    - by Bogdan Protsenko
    I'm having some trouble positioning the Google +1 button on my website. The div is as follows: <div class="g-plusone"></div> The CSS I'm using is pretty simple: .g-plusone { position: absolute; top:95px; left:715px; } I know for a fact that the div in question is being accessed. What's strange is that other social sharing buttons, such as the FB like below follow the same syntax and are positioned perfectly. .fb-like { position: absolute; top:62px; left:715px; } Any ideas?

    Read the article

  • how to dynamically replace css?

    - by photographer
    I've got an image on the page (class='image') within the div (class='galleria_wrapper') and want to place a caption (class='caption') at the lower right corner under that image. The image could be vertical or horizontal, and making a fixed padding-right value let's say .caption<{float:right;padding-top:5px;padding-right:90px;} is not working for one or another. I need to switch on the fly padding-right value depending on horizontal or vertical image is currently on the page. I can theoretically access image's width through document.getElementByName('image').width although don't understand where to put that code. So, I probably need something like that: document.getElementByClass('caption').padding-right = (document.getElementByName('galleria_wrapper').width - document.getElementByName('image').width)/2 Where do I put this code? I do have that in my css file: .caption{float:right;padding-top:5px;} which places the caption below the image, but to far to the right (div 'galleria_wrapper' is wider than most of the images supposed to be displayed within that area). I have an img tag in the html: <img src=image title='this is caption' /></li> ...and some JavaScript which makes title displayed styled by the "caption" css definition. How do I assign variable value for the padding-right without in-advance knowledge of particular image's width?

    Read the article

  • JQuery fadeIn() moving other CSS elements on fadeIn()

    - by Infiniti Fizz
    Hi, I've just been learning some jQUery to get a basic image gallery going on a website I'm creating for a hotel but it's currently not going to plan. I've got it so the arrows will cycle through images (no animation yet) but I decided that the arrows should fade in when the image is hovered over and fade out when not but this is messing up the CSS somehow. The arrows start faded out by calling: $('.arrowRight').fadeOut(0);$('.arrowLeft').fadeOut(0); at the start of the jQuery ready() function. This is fine, but when you hover over the image and the arrows fade in, the image shifts to the right and I don't know why. I suppose it could be because the left arrow now fading in means it is getting pushed over by it but the arrow has the following css: position:relative; top: -90px; left: 25px; Should a relative element be able to alter a normal element's position? If you need to try it out, just hover over the large (placeholder) image and they image will jump across when the arrows fade in and jump back when they fade out. Any ideas why this is happening? I'm a jQuery noob. Here is a link to the page: BeanSheaf Hotel Temporary Space Thanks for your time, InfinitiFizz

    Read the article

  • CSS animated menu

    - by Andrea
    I am trying to obtain something similar to the "share this on..." menu here but I don't quite understand how they are doing this, even after a look at their CSS. I refer to the fact that the images show up on hover. My first attempt would be something like <div id="share_on"> <ul> <li><a href="#"><img src="shareon-digg.png" /></a></li> <li><a href="#"><img src="shareon-reddit.png" /></a></li> ... <li><a href="#"><img src="shareon-stumbleupon.png" /></a></li> </ul> </div> and the CSS: #share_on {overflow: hidden} #share_on ul {margin-bottom: -16px} #share_on li {display: inline} #share_on li:hover {margin-top: -16px} Of course this does not work, which is why I am asking here. In the inactive state, only half of the icon shows up, which is the expected behaviour. But on hover, nothing changes. I also have tried some variations, like #share_on li:hover {margin-bottom: 16px} or #share_on li:hover {padding-bottom: 16px} but none of these works. Any ideas?

    Read the article

  • CSS Horizontal sub-menu

    - by Develman
    Hello, I am working on a horizontal CSS dropdown menu. It is still working nearly fine for IE 7, IE 8 , Firefox and Chrome. But I want to make the top <ul> to be on top level (e.g. z-index: 100). I want this because the top level <ul> has a graphical background and the dropdown is just styled with css and in the current way it is destroying the layout. HTML Code: <div id="mainMenu"> <ul> <li><a href="t1">TOP1<!--[if gt IE 6]><!--></a><!--<![endif]--> <!--[if lte IE 6]><table><tr><td><![endif]--> <ul> <li><a href="l1">LINK1</a></li> <li><a href="l2">LINK2</a></li> <li><a href="l3">LINK3</a></li> <li><a href="l4">LINK4</a></li> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--> </li> <li class="center"><a href="t2">TOP2<!--[if gt IE 6]><!--></a><!--<![endif]--> <!--[if lte IE 6]><table><tr><td></td></tr></table></a><![endif]--></li> <li><a name="t3">TOP3<!--[if gt IE 6]><!--></a><!--<![endif]--> <!--[if lte IE 6]><table><tr><td><![endif]--> <ul class="last"> <li><a href="l5">LINK5</a></li> <li><a href="l6">LINK6</a></li> <li><a href="l7">LINK7</a></li> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--> </li> </ul> </div> CSS Code /* style the outer div to give it width */ #mainMenu { position: absolute; margin-left: 6px; margin-top: 180px; } /* remove all the bullets, borders and padding from the default list styling */ #mainMenu ul { position: absolute; width: 494px; padding: 0; margin: 0; list-style-type: none; background: #FFF url(../images/mainMenu_bg.gif) no-repeat; } /* float the list to make it horizontal and a relative positon so that you can control the dropdown menu positon */ #mainMenu li { position: relative; float: left; padding-left: 5px; width: 160px; vertical-align: middle; text-align: left; } #mainMenu li.center { padding-left: 0px; text-align: center; } /* style the links for the top level */ #mainMenu a, #mainMenu a:visited { display: block; font: bold 12px/1em Helvetica, arial, sans-serif; color: #FFF; text-decoration: none; height: 42px; line-height: 35px; } /* hide the sub levels and give them a positon absolute so that they take up no room */ #mainMenu ul ul { visibility: hidden; position: absolute; height: 0; top: 35px; left: -5px; width: 165px; } /* style the table so that it takes no part in the layout - required for IE to work */ #mainMenu table { position: absolute; top: 0; left: 0; } /* style the second level links */ #mainMenu ul ul a, #mainMenu ul ul a:visited { width: 165px; height: 20px; line-height: 19px; font: bold 10px Helvetica, arial, sans-serif; background: #EF7D0E; color: #FFF; text-align: left; padding: 6px 0 0 5px; border-top: 1px solid #C1650B; } #mainMenu ul ul.last a, #mainMenu ul ul.last a:visited { width: 162px; } /* style the top level hover */ #mainMenu a:hover, #mainMenu ul ul a:hover{ color: #FFF; text-decoration: underline; } #mainMenu :hover > a, #mainMenu ul ul :hover > a { color: #FFF; text-decoration: underline; } /* make the second level visible when hover on first level list OR link */ #mainMenu ul li:hover ul, #mainMenu ul a:hover ul{ visibility: visible; } I have still a problem with showing the table in IE 6 but my main problem here is to show the LINK1...6 under the TOP links. I have tried many settings with z-index but nothing worked here. I hope you can help me ;)

    Read the article

  • Is it really necessary to have a competely validated Mark Up and css for SEO purposes

    - by Hitesh Manchanda
    Hi , While validating my CSS on http://jigsaw.w3.org/css-validator/ I am getting following errors: 1.Property zoom doesn't exist : 1 1. 2.Property -webkit-transition doesn't exist : all 200ms ease-in all 200ms ease-in 3.Property opacity doesn't exist in CSS level 2.1 4.Property -moz-border-radius doesn't exist 5.Property -webkit-border-radius doesn't exist Is it really required to validate the MarkUp and CSS completely for SEO or these errors which mostly are browser specific can be ignored for now. If these errors have to removed can someone please suggest the way to do so also.

    Read the article

  • Tools to make CSS sprites?

    - by Simon_Weaver
    Are there any good tools to make css sprites? IDEALLY I'd want to give it a directory of images and an existing .css file that refers to those images and have it create a big image optimized with all the little images AND change my .css file to refer to those images. At the least I'd want it to take a directory of images and generate a big sprite and the .css necessary to use each as a background. Are there any good photoshop plugins or fully blown apps to do this?

    Read the article

  • Variable-width inline underline effects in CSS

    - by sidereal
    I need to simulate the look of a typical paper form in CSS. It consists of a two-column table of fields. Each field consists of a field name (of variable width) followed by an underline that continues to the end of the column. The field might be populated, in which case there is some text centered above the line, or it may be blank. If that isn't clear, he's a rough idea in manky ASCII art: Name: _______Foo_______ Age: _____17______ Location: __Melbourne__ Handedness: _Left_ (except that the underline would continue under any text) To implement the underline without text, I assume I should use a border-bottom rather than a text-decoration: underline. Additionally, I need the bordered element to take up the full available space. Both of those argue for a block-level element. However, I can't find any way to get the block level element (either a div, an li, or a span set to display: block or inline-block) to remain on the same line as the label. As soon as I give it a width: 100%, it newlines. I've tried various combinations of floats, and I'm not inclined to do anything ridiculous with absolute positioning. Any recommendations?

    Read the article

  • jQtouch CSS Header Bar

    - by shaiss
    I'm using jQtouch for a small mobile app. Using the default CSS the app looks like I want it to. However, I need to have a header on the left and right of the page. For example, If anyone can point me in the right direction to achieve this I would greatly appreciate it. Thank you!

    Read the article

  • CSS selectors : should I make my CSS easier to read or optimise the speed

    - by Laurent Bourgault-Roy
    As I was working on a small website, I decided to use the PageSpeed extension to check if their was some improvement I could do to make the site load faster. However I was quite surprise when it told me that my use of CSS selector was "inefficient". I was always told that you should keep the usage of the class attribute in the HTML to a minimum, but if I understand correctly what PageSpeed tell me, it's much more efficient for the browser to match directly against a class name. It make sense to me, but it also mean that I need to put more CSS classes in my HTML. It make my .css file harder to read. I usually tend to mark my CSS like this : #mainContent p.productDescription em.priceTag { ... } Which make it easy to read : I know this will affect the main content and that it affect something in a paragraph tag (so I wont start to put all sort of layout code in it) that describe a product and its something that need emphasis. However it seem I should rewrite it as .priceTag { ... } Which remove all context information about the style. And if I want to use differently formatted price tag (for example, one in a list on the sidebar and one in a paragraph), I need to use something like that .paragraphPriceTag { ... } .listPriceTag { ... } Which really annoy me since I seem to duplicate the semantic of the HTML in my classes. And that mean I can't put common style in an unqualified .priceTag { ... } and thus I need to replicate the style in both CSS rule, making it harder to make change. (Altough for that I could use multiple class selector, but IE6 dont support them) I believe making code harder to read for the sake of speed has never been really considered a very good practice . Except where it is critical, of course. This is why people use PHP/Ruby/C# etc. instead of C/assembly to code their site. It's easier to write and debug. So I was wondering if I should stick with few CSS classes and complex selector or if I should go the optimisation route and remove my fancy CSS selectors for the sake of speed? Does PageSpeed make over the top recommandation? On most modern computer, will it even make a difference?

    Read the article

  • CSS absolute DIV causing other absolute DIV problems

    - by Tim
    Hello, I have implemented a chat script which requires an absolutely positioned DIV to be wrapped around the pages content. This is to ensure the chat windows stay at the bottom. The problem is that because of the absolute positioning of this main wrapper, all other absolutely positioned elements (eg. Jquery Auto-completes, datepicker's etc) now scroll up and down with the page. Here is an example of the HTML: <body> <div id="main_container"> <div id="content">Elements like Jquery Autocompletes, Datepickers with absolute positioned elements in here</div> </div> The DIV "main_container" style looks like this: #main_container { width:100%; background-color:#ffffff; /* DO NOT REMOVE THIS; or you'll have issue w/ the scrollbar, when the mouse pointer is on a white space */ overflow-x: hidden; overflow-y: scroll; height:100%; /* this will make sure that the height will extend at the bottom */ position:absolute; /* container div must be absolute, for our fixed bar to work */ } I hope there is a simple fix as the chat script is too good to get rid of. Thanks, Tim

    Read the article

  • Best practice: How to use (repeat) CSS style attributes correctly?

    - by ellie
    Hi guys! As a CSS newbie I'm wondering if it's recommended by professionals to repeat specific style attributes and their not inherited but default properties for every relevant selector? For example, should I rather use body {background:transparent none no-repeat; border:0 none transparent; margin:0; padding:0;} img {background:transparent none no-repeat; border:0 none transparent; margin:0; outline:transparent none 0; padding:0;} div#someID {background:transparent none no-repeat; border:0 none; margin:0 auto; padding:0; text-align:left; width:720px; ...} or body {background:transparent; border:0; margin:0; padding:0;} img {background:transparent; border:0; margin:0; outline:0; padding:0;} div#someID {background:transparent; border:0; margin:0 auto; padding:0; text-align:left; width:720px; ...} or just what (I think) I really need body {background:transparent; margin:0; padding:0;} img {border:0; outline:0;} div#someID {margin:0 auto; width:720px; ...} If it's best practice to go with the first or second one what do you think about defining a class like .foo {background:transparent; border:0; margin:0; padding:0;} and then applying it to every relevant selector: <div id="someID" class="foo">...</div> Yep, now I'm totally confused... so please advise! Thanks!

    Read the article

  • Simple 2 column CSS layout with nested divs

    - by Dan
    Hello, I have good familiarity with CSS but for some reason I am unable to achieve the result I want in this case. Here is the link to my test site http://danberinger.com/test.html Keep in mind that I want a 2 column layout and that the background wrapper color (gray) is not showing. Instead the body background color image is being put in place of where the wrapper background should be. Any suggestions would be greatly appreciated.

    Read the article

  • CSS: 100% of container height without modifying the container

    - by Rena
    Yeah, this ugly question again. I'm writing some HTML that gets inserted into a page. I have no control over the rest of the page. The structure is something like: <table <tr <td rowspan="2"left column</td <td height="1"top row above content</td </tr <tr<td height="220"my content here</td</tr </table I can write whatever I want into that table cell (including style tags to pack in my CSS), but I can't touch anything outside of it, which means I can't set the height of any parent element (including html and body), add a doctype (it has none), etc - that already kills just about every solution I can find (all seem to be "add a doctype" and/or "give the parent container a fixed height"). What I want to do is simply have a <div fill the entire cell. Width is no problem but unsurprisingly height is being a massive pain. Writing "height: 100%" doesn't do anything unless the container has a fixed height (the height="220" attribute apparently doesn't count) or the div uses absolute positioning - and then it seems to want to use 100% of the window's height (and width even) instead of the cell's. The root of the problem is the left column varies in height, as does the content, and when the left column cell is larger than the content, it won't expand to fill the cell it's in. If I set a fixed height for the content, it'll be much larger than necessary most of the time, and if I don't, it doesn't take up all of the cell and leaves an ugly gap at the bottom.

    Read the article

  • GWT layout panels vs. CSS layout

    - by David
    I read an article entitled "Tags First GWT", in which the writer suggests using GWT for event-handling, and CSS for layout. I just don't know whether the benefit of GWT's cross-browser compatibility goodness outweighs the flexibility offered by pure CSS layout. GWT GWT 2.0 has some snazzy layout panels, but to get them to resize properly you really need to build the entire panel containment tree from the root panel down. It's an all-or-nothing thing, it seems. CSS You can use CSS to layout an application too, and I'm inclined to do just that, if only to justify my purchase of several books touting the 'semantic markup' gospel. The downside might be cross-browser incompatibilities, the prevalence of which I have yet to determine. Which way to go? What is your opinion? Are cross-browser problems bad enough, and prevalent enough, to warrant ditching my CSS books, and building with GWT layout panels?

    Read the article

  • CSS Trouble, Why does it move itself?

    - by Patrick
    Hello! I am stuck on the CSS part, am helping a friend to implement one thing on her webpage. Its a dropdown menu and i got everything working the way i want it to. My problem is that it moves itself to the beginning of the row? http://gazet.se/TestPages/Test.aspx Its just below the logo and as you can see, its on the correct line but not in the correct position (should be between the purple "Nyhetsbrev" and the black "Experthörnan"-images, but it ends up on the beginning of the row instead? Any ideas?

    Read the article

  • Css editor with certain features

    - by user255408
    I need a light css editor with certain functions. Already downloaded and tried a few apps but still no luck, none of them fit my requirements. Actually, there is one, CssEdit (or TextMate), but unfortunately i'm a windows user... Already tried: built-in NetBeans IDE css editor (btw nice editor, the one i'm using now for css) IntelJ IDE (very good html and css editor, but using the entire ide just for this - that's crazy) ArduoCss (very buggy in win7 environment) Notepad Notepad++ (it rules, but as i said, i need something more functional for css editing) Style Master ( if i don't find anything else, probably i'll choose this one) Stylizer ( also might be my choice, but it's black interface kills me, also extremy noob-oriented, i even couldn't find a way to see the source code) Some of the features i am looking for: grouping by comments like here snippets autocomplete, if i type for instance f-s, it should recognize and expand it to "font-size" property color picker The editor must have at least the first feature that i listed above. Sorry for my poor english.

    Read the article

  • Altering CSS for nav bar images to accomodate IE

    - by Kim
    My horizontal nav bar is populated with images for the links that are coming from one image that includes all the sub-images; each nav item image is identified by the pixel location within the larger image. This works perfectly fine in Firefox and Safari, but in IE, all of the images are misplaced too low within the nav bar (can only barely see the tops of the words). Two questions: How do I fix this in the css so it is back-compatible with the more recent versions (and current versions) of IE Do I need a separate IE stylesheet? Thanks!

    Read the article

  • CSS Relative sized header/footer

    - by superexsl
    Hi I'm not a CSS expert so I might be missing something obvious. I'm trying to set a relative size header and footer (so that on larger monitors, the header and footer are larger than on smaller screens). To do this, I'm using a percentage height. However, this only works if I set the position to absolute. The problem is, setting it to absolute means that it overlaps the main part of the screen (inbetween the header and footer). Setting it to relative doesn't work since it relies on items being inside the header/footer. This is what my header looks like: .header { position:absolute; top:0px; background-color:white; width:100%; height:30%; } the ASPX page simply contains <div class="header"></div> Is there a way to get relatively proportioned header and footers? Thanks

    Read the article

  • How to maximize a floating div width when one div is removed or hidden?

    - by Maju
    I have two div columns sidebar(left) and page-content(right). I toggle removing and adding 'sidebar' using jquery but unable to maximize '#page-content' to take up the empty space when sidebar is removed.I tried removing 'margin-left:250px;' but the #page-content is going to the bottom. In short i want Toggle before | sidebar | page-content | Toggle after | page-content                | but it happens like | sidebar | | page-content                | Please help. Here is the css and jquery used. Thanx css #sidebar { float:left; width:185px; color:#333; padding:25px 25px; } #page-content { margin-left:250px; padding:25px 35px 25px 25px; color:#333; } jQuery $(document).ready(function() { $('a#side-toggle').click(function() { $('#sidebar').toggle(400); return false; }); });

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >