Search Results

Search found 11699 results on 468 pages for 'css selectors'.

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

  • CSS rules help - layout and menu

    - by NachoF
    Im trying to use this template for a webapp Im making (I really suck at css so I have to use templates). I have two questions with it... I deleted all of the content of the "#content" div and added my own content... the problem is that since its not as long as the original content the header comes up and is now on top of the sidebars....how can I make the header stay on the bottom of the page?? My second question is, what would be the easiest way to add sidebar subitems that slide-right on hover...?? Thanks in advance

    Read the article

  • CSS : How can I add shadow to a label or box

    - by Rachel
    I have an button just as have Ask Question on SO and here is the CSS for it: .rfs .grey_btn{ float: right; margin: 15px 5px; } Now I have to add border shadow to it and I have tried border-radius and box-shadow but it does not give me proper result. Also other question is that I have a label or box say and now I want to increase size of that box so that I have move the text inside that box to right, currently if I move it to right than it reaches the end limit of box and so I want to increase the size of box so that I can push text more towards right. Hope I have made my question clear. Any guidance would be highly appreciated. Thanks.

    Read the article

  • protecting css selectors on large website

    - by Tim
    I have content that appears within a corporate website inside an iframe. Several departments contribute their own CSS files to manage the overall UI and design. My problem is that they may use selectors for elements like td (for instance), without notice. Of course that will affect my own content in the frame unless I add a class to every td. I'm just using td as an example: the generic style for any element could change without notice. Is there any method/convention/practice I can use to protect my own styling?

    Read the article

  • Help with CSS - getting an element to fill 100% of the remaining vertical space

    - by Jack W-H
    Hi folks I'd consider myself a reasonable standard CSS/XHTML chap but I'm pretty baffled by this. The problem is available here: http://furnace.howcode.com - (note that the site is still in development, most stuff doesn't work, and it's likely to change fairly quickly as it is updated often). Basically I've got a fluid layout that needs to work in the same proportions on any resolution. Here's a screenshot of how the designer invisioned it (I apologise for my Paint-tool anotations): I want the tabs and the search box to STAY at the top of Col2, whilst there should be a scrollable area beneath it where the results are returned. I want NO vertical viewport scrolling, only within the 100%-height area thingy. My problem is this. If you take a look at http://furnace.howcode.com, you'll see that I've got a bit of a problem. I've made a placeholder black-background div which I will turn into the Tabs shortly. However I want the Col2 div to float BENEATH this and fill 100% of the remaining vertical height (i.e. go to the bottom of the screen, nomatter what the resolution is) and Col3 to be in the place where Col2 currently has been put (it normally is there automatically, when Col2 is in the right place!). I hope that makes sense. If you need to me to clarify please just ask. Cheers! Jack

    Read the article

  • Keeping footer visible and height 100% in CSS

    - by vtortola
    I'm trying to create a very simple page that contains a container, a header, a left column and a footer: <containter> <header /> <content /> <leftBar /> <footer /> </containter> I want to use the 100% of the height, as I can do with the width, but I simply dont get it work.At his moment I'm usingmin-height, but how could I use theheight:100%` ? What I like is that the footer is always visible, and you scroll the content. Current CSS body { font-family: Verdana; font-size: 0.8em; background-color:#f1f1f1; } #container { border:solid 2px Black; position:absolute; left:10%; width:80%; margin:auto; } #header { height:20px; background: #DDDDDD; } #leftBar { width: 20%; background: #669966; min-height:600px; postion:absolute; top:20px; bottom:20px; } #content { float:right; background-color: #cdcde6; position:absolute; left:20%; right:0px; bottom:20px; top:20px; padding:5px; } #footer { position:absolute; height:20px; }

    Read the article

  • CSS - Overlaying one image on top of another

    - by Jack W-H
    Hey folks! I can't best describe this in words, so I'll show you with pictures. Here's how my designer intends the Gravatar images to look in the sidebar of our site: Here's the overlay image I made (screenshotted from Photoshop): Here's how it looks right now... Not quite ideal, I think you'll agree. This is the CSS code I am using: .gravatarsidebar { float:left; padding:0px; width:70px; } .gravataroverlay { width:68px; height:68px; background-image: url('http://localhost:8888/images/gravataroverlay.png'); } And here's the XHTML (and a sprinkle of PHP to fetch the Gravatar based on the user's email address, which is fetched from our database): <div class="gravataroverlay"></div> <div class="gravatarsidebar"> <?php $gravatar_link = 'http://www.gravatar.com/avatar/' . md5($email) . '?s=68'; echo '<img src="' . $gravatar_link . '" alt="Gravatar" />'; ?> </div> So what can I do? I can't use relative positioning as it makes the word 'Search' in the div below stay moved to the right. Thanks for your help! Jack

    Read the article

  • Which combing css technique?

    - by DotnetShadow
    Hi there, Which of the following would you say is the best way to go when combining files for CSS: Say I have a master.css file that is used across all pages on my website (page1.aspx, page2.aspx) Page1.aspx - A specific page that has some unique css that is only ever used on that page, so I create a page1.css and it also uses another css grids.css Page2.aspx - Another specific page that is different from all other pages on the site and is different to page1.aspx, I'll name this page2.aspx and make a page2.css this doesn't use grids.css So would you combine the scripts as: Option1: Combine scripts csshandler.axd?d=master.css,page1.css,grids.css when visiting page1 Combine scripts csshandler.axd?d=master.css,page2.css when visiting page2 Benefits: Page specific, rendering quicker since only selectors for that page need to be matched up no unused selectors Drawback: Multiple combinations of master.css + page specific hence master.css has to be downloaded for each page Option2: Combine all scripts whether a page needs them or not csshandler.axd?d=master.css,page1.css,page2.css,grids.css (master, page1 and page2) that way it gets cached as one. The problem is that rendering maybe slower since it will have to try and match EVERY selector in the css with selectors on the page even the missing ones, so in the case of page2.aspx that doesn't use grids.css the selectors in grids.css will need to be parsed to see if they are in page2 which means rendering will be slow Benefits: One file will ever be downloaded and cached doesn't matter what page you visit Drawback: Unused selectors will need to be parsed by the browser slower rendering Option3: Leave the master file on it's own and only combine other scripts (the benefit of this is because master is used across all pages there is a chance that this is cached so doesn't need to keep on downloading csshandler.axd?d=Master.css csshandler.axd?d=page1.css,grids.css Benefits: master.css file can be cached doesn't matter what page you visit. Not many unused selectors as page spefic is applied Drawback: Initially minimum of 2 HTTP request will have to be made What do you guys think? Cheers DotnetShadow

    Read the article

  • Which combining css technique?

    - by DotnetShadow
    Hi there, Which of the following would you say is the best way to go when combining files for CSS: Say I have a master.css file that is used across all pages on my website (page1.aspx, page2.aspx) Page1.aspx - A specific page that has some unique css that is only ever used on that page, so I create a page1.css and it also uses another css grids.css Page2.aspx - Another specific page that is different from all other pages on the site and is different to page1.aspx, I'll name this page2.aspx and make a page2.css this doesn't use grids.css So would you combine the scripts as: Option1: Combine scripts csshandler.axd?d=master.css,page1.css,grids.css when visiting page1 Combine scripts csshandler.axd?d=master.css,page2.css when visiting page2 Benefits: Page specific, rendering quicker since only selectors for that page need to be matched up no unused selectors Drawback: Multiple combinations of master.css + page specific hence master.css has to be downloaded for each page Option2: Combine all scripts whether a page needs them or not csshandler.axd?d=master.css,page1.css,page2.css,grids.css (master, page1 and page2) that way it gets cached as one. The problem is that rendering maybe slower since it will have to try and match EVERY selector in the css with selectors on the page even the missing ones, so in the case of page2.aspx that doesn't use grids.css the selectors in grids.css will need to be parsed to see if they are in page2 which means rendering will be slow Benefits: One file will ever be downloaded and cached doesn't matter what page you visit Drawback: Unused selectors will need to be parsed by the browser slower rendering Option3: Leave the master file on it's own and only combine other scripts (the benefit of this is because master is used across all pages there is a chance that this is cached so doesn't need to keep on downloading csshandler.axd?d=Master.css csshandler.axd?d=page1.css,grids.css Benefits: master.css file can be cached doesn't matter what page you visit. Not many unused selectors as page spefic is applied Drawback: Initially minimum of 2 HTTP request will have to be made What do you guys think? Cheers DotnetShadow

    Read the article

  • CSS Footer bar bottom center issue

    - by StealthRT
    Hey all, i am trying to get my bottom bar to center on the screen but i am unable to do so. <style type="text/css"> body { background: #fffff; margin: 0; padding: 0; font: 10px normal Verdana, Arial, Helvetica, sans-serif; } * {margin: 0; padding: 0; outline: none;} #bottomBar { position: fixed; bottom: 0px; left: 0px; z-index: 9999; background: #e3e2e2; border: 1px solid #c3c3c3; border-bottom: none; width: 500px; min-width: 500px; margin: 0px auto; -moz-opacity:.90; filter:alpha(opacity=90); opacity:.90; } *html #bottomBar {margin-top: -1px; position: absolute; top:expression(eval(document.compatMode &&document.compatMode=='CSS1Compat') ?documentElement.scrollTop+(documentElement.clientHeight-this.clientHeight) : document.body.scrollTop +(document.body.clientHeight-this.clientHeight));} #bottomBar ul {padding: 0; margin: 0;float: left;width: 100%;list-style: none;border-top: 1px solid #fff;} #bottomBar ul li{padding: 0; margin: 0;float: left;position: relative;} #bottomBar ul li a{padding: 5px;float: left;text-indent: -9999px;height: 16px; width: 16px;text-decoration: none;color: #333;position: relative;} html #bottomBar ul li a:hover{ background-color: #fff; } a.PDF{background: url(http://www.xxx.com/img/pdficon.png) no-repeat center center; } </style> <div id="bottomBar"> <ul id="mainpanel"> <li style="padding-top:5px; font-family:Arial, Helvetica, sans-serif; padding-left: 5px;">First time here? Be sure to check out the "this" button above or download the PDF here -></li> <li><a href="http://www.xxx.com" class="PDF">Download PDF <small>Download PDF</small></a></li> </ul> </div> Thanks! David

    Read the article

  • CSS, Aboslute divs in a relativly positioned div

    - by ace
    Given the following code, how can I make the height of wrapper div extend all the way down. <!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"> <head> <meta content="en-us" http-equiv="Content-Language" /> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>Untitled 1</title> <style type="text/css"> .wrapperDiv { position: relative; width: 800px; background-color: #FFFF00; margin-right: auto; margin-left: auto; } .content { position: absolute; width: 95%; top: 55px; background-color: #008000; } .footer { position: absolute; width: 95%; height: 50px; background-color: #FF00FF; bottom: 5px; } .header { position: absolute; width: 95%; height: 50px; background-color: #CCFF33; top: 5px; } </style> </head> <body> <div id="wrapper" class="wrapperDiv"> <div id="layer2" class="footer"> 3</div> <div id="layer3" class="header"> 1</div> <div id="layer1" class="content"> 2<br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> END</div> </div> </body> </html>

    Read the article

  • CSS Fluid Grid Layout Problem

    - by Fuego DeBassi
    I have a max-width em based container for my layout. Within it I have many floated fixed width boxes, at 230px to be exact. At the max-width the container will expand to 90em's. This fit's 6 boxes per line perfectly. As the window sizes down and boxes are bumped to lower rows it leaves an ugly gap with the navigation above. I would like to force the container of the boxes to center them at all times. To illustrate: At full width: http://cl.ly/7393a462f44b8315aaba At smaller width: http://cl.ly/ff48a18d39c4f57c3513 How I would like smaller width to work: http://cl.ly/ae9c3fd04df515253b2d (Photoshoped) My markup looks like this: Biodesign Fusce massa felis, laoreet eu elementum sit amet, aliquam ut magna. Etiam et tellus in nisl vehicula ullamcorper. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean nulla ante. Biodesign Fusce massa felis, laoreet eu elementum sit amet, aliquam ut magna. Etiam et tellus in nisl vehicula ullamcorper. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean nulla ante. Biodesign Fusce massa felis, laoreet eu elementum sit amet, aliquam ut magna. Etiam et tellus in nisl vehicula ullamcorper. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean nulla ante. Biodesign Fusce massa felis, laoreet eu elementum sit amet, aliquam ut magna. Etiam et tellus in nisl vehicula ullamcorper. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean nulla ante. Biodesign Fusce massa felis, laoreet eu elementum sit amet, aliquam ut magna. Etiam et tellus in nisl vehicula ullamcorper. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean nulla ante. Biodesign Fusce massa felis, laoreet eu elementum sit amet, aliquam ut magna. Etiam et tellus in nisl vehicula ullamcorper. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean nulla ante. Biodesign Fusce massa felis, laoreet eu elementum sit amet, aliquam ut magna. Etiam et tellus in nisl vehicula ullamcorper. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean nulla ante. My CSS, is: div#bricks { margin:0 auto; background:red; width:100%; } div.brick { background:#181c21; width:230px; margin:0 5px 10px 5px; position:relative; float:left; } div.brick img { background:#666; max-width:230px; } The #bricks is inside a #main, which looks like: div#main { margin:0 auto; padding:0 50px; position:relative; max-width:90em; } Would love some ideas!

    Read the article

  • Mimicking a HBox / VBox with CSS

    - by Daniel Hai
    I'm an old school tables guy, and am pretty baffled when it comes to modern HTML. I'm trying to something as simple as vertical / horizontal layouts (i.e. Flex's hbox/vbox), but am having major difficulty replicating them. An old table would look something like this for an HBox: <table width="100%" height="100"> <tr valign="middle"> <td nowrap style="background-color:#CCC">I am text on grey</td> <td width="50%" valign="top">displays top</td> <td width="50%" align="right">Autosize Fill (displays bottom right)</td> </tr> </table> Now I'm trying to do this with div's, but to no avail. When using display:inline, I cannot set a percentage width -- it only takes explicit widths. When using float:left, settings 100% percentage width causes it to really be 100% and pushes the next div down. Here's the code I've been playing with: <html> <head> </head> <style type="text/css"> div.test { background-color: #EE9; padding:5px;} body { font-family: Arial; } ul { list-style-type:none; } ul li { float:left; } .hboxinline div { display: inline; } .hboxfloat div { float:left; } .cellA { background-color:#CCC; width:100%; } .cellB { background-color:#DDD; min-width:100; } .cellC { background-color:#EEE; min-width:200; } </style> <body> A = 100%, b = 100, c = 200 <div class="test">old school table <table cellpadding="0" cellspacing="0"> <tr> <td class="cellA">A</td> <td class="cellB">B</td> <td class="cellC">C</td> </tr> </table></div> <br/> <div class="test"> float:left <div class="hboxinline"> <div class="cellA">A</div> <div class="cellB">B</div> <div class="cellC">C</div> </div> </div> <br/> <div class="test">ul / li <ul class="ulli"> <li class="cellA">A</li> <li class="cellB">B</li> <li class="cellC">C</li> </ul> </div> <br/> <div class="test"> display:inline <div class="hboxfloat"> <div class="cellA">A</div> <div class="cellB">B</div> <div class="cellC">C</div> </div> </div> </body> </html>

    Read the article

  • CSS layout problem on Firefox with filling space between end of left column and footer

    - by Jean
    Basically, the left column is supposed to extend to the footer with the continuous red color. However, in Firefox on pages with lots of text, the column does not extend to the footer and leaves a large white gap--see site: http://library.luhs.org/JHSII/about.html I've tried readjusting the heights, creating the sticky footer, and other things I've read about on this site. So I admit that I'm stumped, and what's really odd is that the layout seems to work in IE as there is no white space! I didn't create the site, but I recently inherited it and trying to work through the mess Any help is much appreciated, here's the CSS #html,body{ margin:0; padding:0; border:0; height:100%; } #body{ background:#ffffff; min-width:965px; text-align:center; width: 600px; font: Geneva, Arial, Helvetica, sans-serif; } #.style7{ clear:both; height:1px; overflow:hidden; line-height:1%; font-size:0px; margin-bottom:-1px; } #fullheightcontainer{ margin-left:auto; margin-right:auto; text-align:left; position:relative; width:965px; height:100%; } #wrapper{ min-height:100%; height:100%; background:#660000; background-color: #660000; background-repeat: repeat; } #wrapp\65 r{ height:auto; } # html wrapper{ height:100%; } #outer{ z-index:1; position:relative; margin-left:150px; width:815px; background:#FFFFFF; height:100%; background-color: #FFFFFF; } #left{ width:151px; float:left; display:inline; position:relative; margin-left:-150px; } padding: 20px; border: 0; margin: 0 0 0 240px *>html #left{width:150px;} #container-left{ width:150px; color: #CCCCCC; } * html #left{margin-right:-3px;} #center{ width:800px; float:right; display:inline; margin-left:-1px; } #clearheadercenter{ height:125px; overflow:hidden; } #clearfootercenter{ height:50px; overflow:hidden; } #footer{ z-index:1; position:relative; clear: both; width:965px; height:50px; overflow:hidden; margin-top:-50px; background-color: #660000; } #subfooter1{ background:#FFFFCC; text-align:left; margin-left:150px; height:50px; } #header{ z-index:1; position:absolute; top:0px; width:815px; margin-left:150px; height:100px; overflow:hidden; background-color: #660000; } #subheader1{ background:#FFFFCC; text-align:center; height:70px; } #gfx_bg_middle{ top:0px; position:absolute; height:100%; overflow:hidden; width:815px; margin-left:150px; background:#FFFFFF; } # html #gfx_bg_middle{ display:none; } #floatingnav { margin: 5px 10px 5px 5px; padding: 0px 5px 5px; float: right; font: .75em/1.35em Geneva, Arial, Helvetica, sans-serif; height: 600px; width: 300px; } #floatingnav a { color: #630; } #floatingnav ul { margin-top: -5; } #.floatright { float: right; margin: 0 0 10px 10px; border: 1px solid #666; padding: 2px; } #outer{ word-wrap:break-word; } #table.s1 { border-width: medium; border-spacing: 2px; border-style: none; border-color: rgb(85, 0, 0); border-collapse: collapse; background-color: white; } #table.s1 th { border-width: medium; padding: 2px; border-style: groove; border-color: red; background-color: white; -moz-border-radius: 0px 0px 0px 0px; } #table.s1 td { border-width: medium; padding: 2px; border-style: groove; border-color: #660000; background-color: #FFFFFF; -moz-border-radius: 0px 0px 0px 0px; } #a:link { color: #000066; } #a:visited { color: #000066; } #p.sample { font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: medium; line-height: 100%; word-spacing: normal; letter-spacing: normal; text-decoration: none; text-transform: none; text-align: left; text-indent: 0ex; }

    Read the article

  • CSS - 100% Height Layout with Variable Height Header

    - by Brian D.
    The layout I want to achieve is pretty simple. I want a 100% height layout with a header, and below the header I will have a side bar for navigation and then the content area beside the navigation bar (2-column with header). I can easily do this if I give the header a specified height but I want the header to just take up as much room as is needed. Does anyone know how to do this? Is it possible without knowing the height of the header? Thanks for any help.

    Read the article

  • CSS / HTML centering a textbox

    - by Robert
    This should be easy but its proving difficult... My element I want centred is exactly this <input type="text"> I don't want the text centred, just the text box within the outer div. This is my attempt which is not working <div class ="temp123"> <input type="text" /> </div> Where: .temp123 { margin: 0 auto; margin-left: auto; margin-right: auto; } The text box remains on the left. The outer div has a fixed with of 300px and itself is centered using margin: 0 auto;

    Read the article

  • Getting overflow-y:scroll to work with fixed positioning html & css

    - by Vagabond_King
    I have a Jquery tools scrollable thats set to be fixed to the bottom of the browser window. Ideally i would just like to get a overflow-y:scroll; working for the page as a whole when the browser is < 700px. (so no content gets hidden, as its all fixed place). This feels like it should be simple but its causing me huge headaches. js solutions are fine at this point. Thanks in advance. <body> <div id="background"> <div id="fix_to_floor"> <div class="scrollable"> <div class="frame"> <div class="page" id="page1"> <div class="inner_page"> <h2>About Us</h2> <p>content</p> <div class="floor_items"> <img src="images/chair_n_hole.png" width="950" height="700" alt="Chair N Hole"> </div> </div> </div> <div class="page" id="page2"> <div class="inner_page"> <h2>page 2</h2> <p>content</p> <div class="floor_items"> <img src="images/spachairs.png" width="950" height="700" alt="Spachairs"> </div> </div> </div> <div class="page" id="page3"> <div class="inner_page"> <span class="copy"> <h2>Products</h2> </span> </div> </div> </div> </div> </div> </div> </body> body { width: 100%; bottom:0px; position: fixed; } div#background{ height:948px; width:100%; background: #DDD url('../images/working_bg.jpg') repeat-x fixed bottom center; bottom:0px; overflow: scroll; } div#fix_to_floor{ position: fixed; margin: 0 auto; bottom:0px; height: 700px; width: 1700px; } .content img{ position: absolute; bottom: 0; } #content div.floor_items{ position: absolute; bottom:0; width:1700px; width: 950px; height: 700px; } /* **** specific page backgrounds */ /* page 3 - Products */ #page3 .inner_page{ background: url('../images/display.png') no-repeat scroll bottom center; z-index: 50; } #page3 .copy{ float: left; margin: 100px 300px; } #page1 div.floor_items img{ margin: 0 0 0 0px; } /********* SCROLLABLE *********/ div.scrollable{ bottom: 0; position: relative; /* required*/ overflow:hidden; width:1700px; height: 700px; left:0px; } /* needs to be huge and fixed. holds the content */ div.scrollable div.frame{ width: 20000em; position: absolute; height: 700px; } /* single item , must bve floated for horiz. scrolling*/ div.frame div.page{ float:left; width: 1700px; height: 700px; margin: 0; } div.page div.inner_page{ width:950px; height:700px; margin: 0 370px; /* border: 1px solid red;*/ }

    Read the article

  • CSS Margin/Padding Issue on Browser Zoom

    - by korymath
    I am having difficulty getting my page to show up correctly at various browser zoom settings. http://andstones.ca/newsite The content is aligned if the user is zoomed out on the page, but once they zoom too far out and refresh the page, or if they are too zoomed in and the page loads, then the content pane is shifted. This does not seem to be an issue in firefox, but it is a very serious issue in chrome/safari/iexplore and on the iPad. What can I do to ensure that the main content loads in the correct position regardless of user browser settings? Thanks , Kory

    Read the article

  • CSS 100% Height, and then Scroll DIV not page

    - by Justin
    Okay so I haven't been able to find a question with an answer yet, so I decided to make my own. I am trying to create a 100% fluid layout, which technically I have done. http://stickystudios.ca/sandbox/stickyplanner/layout/index2.php BUT, what I want it to now do, is make the page 100% in HEIGHT... But I don't want the page to scroll I want the inner DIV to scroll. So I believe in short I want it to detect the height of the viewport screen, go 100%, and then IF content is longer then the screen, scroll the specific DIV, NOT the page. I hope this makes sense. Thanks in advance. Justin

    Read the article

  • flow 2 columns of text automatically with CSS

    - by Joseph Mastey
    I have the code similar to the following: <p>This is paragraph 1. Lorem ipsum ... </p> <p>This is paragraph 2. Lorem ipsum ... </p> <p>This is paragraph 3. Lorem ipsum ... </p> <p>This is paragraph 4. Lorem ipsum ... </p> <p>This is paragraph 5. Lorem ipsum ... </p> <p>This is paragraph 6. Lorem ipsum ... </p> I'd like to, without markup if possible, cause this text to flow into two columns (1-3 on the left, 4-6 on the right). The reason for my hesitation to add a column using a <div> is that this text is entered by the client via a WYSIWYG editor, so any elements I inject are likely to be killed later on inexplicably. Thanks, Joe

    Read the article

  • CSS difficulty horizontally displaying / repeating left and right wrapper images to ends of screen

    - by user310606
    I am having trouble getting my left and right repeaters to fill the available space left on wide screens for a website I am working on. The left and right repeaters are background images (approxamately 350px wide) that I would like to show part of, or even repeat if the screen (visible area of screen shown in red) becomes wide enough. Any help or suggestions would be greatly appreciated! Thanks, John

    Read the article

  • CSS two divs next to each other

    - by Martijn
    Hi, I want to put two divs next to each other. The right div is about 200px; en the div left must fill up the rest of the screen width? How can i do this? I don't want to use percents because then my layout is crap :) Thnx

    Read the article

  • CSS Width Greater then Page Width without Horizontal Scroll (overflow:hidden not an option)

    - by Anders H
    I've got a basic layout going in 960.gs. One line of text is absolutely positioned, starting within an inner DIV and exiting only the right side of the page. Here's a screenshot: The issue is that as the text appears as a series of unbroken words, if the width of the text box doesn't extend beyond the end of the page, it breaks some distance from the edge. overflow: hidden; doesn't do the trick because I need to set the width wider than the page. float won't work because the text can't escape the width of the inner DIV. I can't set it outside the inner DIV and just position it there as the same problem will still exist. The code is basically as simple as: <wrapper (containing) DIV> <text stripe DIV> <p></p> </text stripe DIV> </ wrapper DIV> I know I've done something like this before and I can't for the life of me remember what I ended up doing. Thanks.

    Read the article

  • Metro: Query Selectors

    - by Stephen.Walther
    The goal of this blog entry is to explain how to perform queries using selectors when using the WinJS library. In particular, you learn how to use the WinJS.Utilities.query() method and the QueryCollection class to retrieve and modify the elements of an HTML document. Introduction to Selectors When you are building a Web application, you need some way of easily retrieving elements from an HTML document. For example, you might want to retrieve all of the input elements which have a certain class. Or, you might want to retrieve the one and only element with an id of favoriteColor. The standard way of retrieving elements from an HTML document is by using a selector. Anyone who has ever created a Cascading Style Sheet has already used selectors. You use selectors in Cascading Style Sheets to apply formatting rules to elements in a document. For example, the following Cascading Style Sheet rule changes the background color of every INPUT element with a class of .required in a document to the color red: input.red { background-color: red } The “input.red” part is the selector which matches all INPUT elements with a class of red. The W3C standard for selectors (technically, their recommendation) is entitled “Selectors Level 3” and the standard is located here: http://www.w3.org/TR/css3-selectors/ Selectors are not only useful for adding formatting to the elements of a document. Selectors are also useful when you need to apply behavior to the elements of a document. For example, you might want to select a particular BUTTON element with a selector and add a click handler to the element so that something happens whenever you click the button. Selectors are not specific to Cascading Style Sheets. You can use selectors in your JavaScript code to retrieve elements from an HTML document. jQuery is famous for its support for selectors. Using jQuery, you can use a selector to retrieve matching elements from a document and modify the elements. The WinJS library enables you to perform the same types of queries as jQuery using the W3C selector syntax. Performing Queries with the WinJS.Utilities.query() Method When using the WinJS library, you perform a query using a selector by using the WinJS.Utilities.query() method.  The following HTML document contains a BUTTON and a DIV element: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Application1</title> <!-- WinJS references --> <link href="//Microsoft.WinJS.0.6/css/ui-dark.css" rel="stylesheet"> <script src="//Microsoft.WinJS.0.6/js/base.js"></script> <script src="//Microsoft.WinJS.0.6/js/ui.js"></script> <!-- Application1 references --> <link href="/css/default.css" rel="stylesheet"> <script src="/js/default.js"></script> </head> <body> <button>Click Me!</button> <div style="display:none"> <h1>Secret Message</h1> </div> </body> </html> The document contains a reference to the following JavaScript file named \js\default.js: (function () { "use strict"; var app = WinJS.Application; app.onactivated = function (eventObject) { if (eventObject.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.launch) { WinJS.Utilities.query("button").listen("click", function () { WinJS.Utilities.query("div").clearStyle("display"); }); } }; app.start(); })(); The default.js script uses the WinJS.Utilities.query() method to retrieve all of the BUTTON elements in the page. The listen() method is used to wire an event handler to the BUTTON click event. When you click the BUTTON, the secret message contained in the hidden DIV element is displayed. The clearStyle() method is used to remove the display:none style attribute from the DIV element. Under the covers, the WinJS.Utilities.query() method uses the standard querySelectorAll() method. This means that you can use any selector which is compatible with the querySelectorAll() method when using the WinJS.Utilities.query() method. The querySelectorAll() method is defined in the W3C Selectors API Level 1 standard located here: http://www.w3.org/TR/selectors-api/ Unlike the querySelectorAll() method, the WinJS.Utilities.query() method returns a QueryCollection. We talk about the methods of the QueryCollection class below. Retrieving a Single Element with the WinJS.Utilities.id() Method If you want to retrieve a single element from a document, instead of matching a set of elements, then you can use the WinJS.Utilities.id() method. For example, the following line of code changes the background color of an element to the color red: WinJS.Utilities.id("message").setStyle("background-color", "red"); The statement above matches the one and only element with an Id of message. For example, the statement matches the following DIV element: <div id="message">Hello!</div> Notice that you do not use a hash when matching a single element with the WinJS.Utilities.id() method. You would need to use a hash when using the WinJS.Utilities.query() method to do the same thing like this: WinJS.Utilities.query("#message").setStyle("background-color", "red"); Under the covers, the WinJS.Utilities.id() method calls the standard document.getElementById() method. The WinJS.Utilities.id() method returns the result as a QueryCollection. If no element matches the identifier passed to WinJS.Utilities.id() then you do not get an error. Instead, you get a QueryCollection with no elements (length=0). Using the WinJS.Utilities.children() method The WinJS.Utilities.children() method enables you to retrieve a QueryCollection which contains all of the children of a DOM element. For example, imagine that you have a DIV element which contains children DIV elements like this: <div id="discussContainer"> <div>Message 1</div> <div>Message 2</div> <div>Message 3</div> </div> You can use the following code to add borders around all of the child DIV element and not the container DIV element: var discussContainer = WinJS.Utilities.id("discussContainer").get(0); WinJS.Utilities.children(discussContainer).setStyle("border", "2px dashed red");   It is important to understand that the WinJS.Utilities.children() method only works with a DOM element and not a QueryCollection. Notice that the get() method is used to retrieve the DOM element which represents the discussContainer. Working with the QueryCollection Class Both the WinJS.Utilities.query() method and the WinJS.Utilities.id() method return an instance of the QueryCollection class. The QueryCollection class derives from the base JavaScript Array class and adds several useful methods for working with HTML elements: addClass(name) – Adds a class to every element in the QueryCollection. clearStyle(name) – Removes a style from every element in the QueryCollection. conrols(ctor, options) – Enables you to create controls. get(index) – Retrieves the element from the QueryCollection at the specified index. getAttribute(name) – Retrieves the value of an attribute for the first element in the QueryCollection. hasClass(name) – Returns true if the first element in the QueryCollection has a certain class. include(items) – Includes a collection of items in the QueryCollection. listen(eventType, listener, capture) – Adds an event listener to every element in the QueryCollection. query(query) – Performs an additional query on the QueryCollection and returns a new QueryCollection. removeClass(name) – Removes a class from the every element in the QueryCollection. removeEventListener(eventType, listener, capture) – Removes an event listener from every element in the QueryCollection. setAttribute(name, value) – Adds an attribute to every element in the QueryCollection. setStyle(name, value) – Adds a style attribute to every element in the QueryCollection. template(templateElement, data, renderDonePromiseContract) – Renders a template using the supplied data.  toggleClass(name) – Toggles the specified class for every element in the QueryCollection. Because the QueryCollection class derives from the base Array class, it also contains all of the standard Array methods like forEach() and slice(). Summary In this blog post, I’ve described how you can perform queries using selectors within a Windows Metro Style application written with JavaScript. You learned how to return an instance of the QueryCollection class by using the WinJS.Utilities.query(), WinJS.Utilities.id(), and WinJS.Utilities.children() methods. You also learned about the methods of the QueryCollection class.

    Read the article

  • Jquery selectors question

    - by Ben
    Hi all, I am not an expert at jquery but trying to get a menu to work. Basically, I have a menu made of up to 3 levels of nested lists. The first level has a little arrow has a background image that opens or close when opening the first level list. Any other nested lists don't need to have the background image. My script opens the menu when you click on it and is also supposed to switch the first level list from a class "inactive" to a class "active". Here is the script: $(document).ready(function(){ $("#left-navigation-holder ul.level1 li.inactive").toggle(function(){ $(this).addClass("active"); }, function () { $(this).removeClass("active"); }); $("#left-navigation-holder li a").click(function(){ menu = $(this).parent('li').children('ul'); menu.toggle(); }); }); The problem is that the toggle function also happens when clicking on second and third level lists causing the arrows to toggle even if the first level list isn't clicked on. I thought using $("#left-navigation-holder ul.level1 li.inactive").toggle would limit the function to the first level list with a class "inactive". Any help would be really appreciated. Ben

    Read the article

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