CSS - Css Selectable Block Test
I have a caption text in a span tag appear on an image rollover.
I'm trying to make the caption text selectable and having a terrible time. Can anyone point me in the right direction? Thanks! Here is my code: Code: <!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 http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>testing</title> <style type="text/css"> <!-- body { background-color: #FFFFFF; } div#img a span {display: none;} div#img a:hover span{display: block; position:fixed; top: 300px; left: 350px; width: 125px; padding: 5px; margin: 10px; color: #AAA; background: black; opacity: .5; font: 10px Verdana, sans-serif; text-align: left; } --> </style></head> <body> <div id="img"><a href="#"><img src="http://i43.tinypic.com/2irct0.jpg" width="500" height="392" border="0"/><span>here is the caption text!</span></a></div> </body> </html> Similar TutorialsI am curious how people go about testing their CSS code in all browsers? I am a mac user and don't have a PC sitting next to me. I am using browsershots.org .... but its awfully slow (I even paid for priority processing) Just curious how everyone checks their CSS code on a Mac? Because IE is the big problem causer.... Hi there. Please have a look here. Could you please report any prob you come into and the browser you're on? Check out the layout section. Thank you in advance :) In it I meld Tonico Strasser's brilliant "Flexible Layout" (http://www.webproducer.at/flexible-layout ) with Stu Nicholls' mega-cool "How to Use CSS to Solve min-width Problems in Internet Explorer" (http://www.webreference.com/programming/min-width/ ). From a geek perspective this is a pretty cool layout: fully flexible source ordered pure CSS three (or two or one) full column layout with headers and footers and no javascript. It should look pretty much the same on any modern browser and should scale up and down smoothly as the font sizes are changed by the user. I'm curious how it works on real world browsers. Does it jerk or flicker as it is loaded or the browser window is resized? Does it scale up and down smoothly as you change the font size? Are the contents of the side columns always visible as you play with the browser window and font size? Do the side columns maintain their size and the center column shrink as the browser window shrinks until a minimum center column size is reached? Does it do anything funky? I've already found some minor funkiness on older versions of modern browsers running on Macs, but nothing awful, and the funkiness is due to browser bugs about which I can't do anything (data table captions, for example, don't seem to be understood well by Opera 6 for Macs . . . but then this is a data table caption issue, not a layout issue . . .). How does this layout work for you? In addition to the feedback, let me know the browser and platform you are using (eg., Firefox 1.0.6 on Windows XP). I'm particularly interested in feedback from folks testing it over a modem. Thanks! Here's the link to my test page: http://www.econinformation.com/layout_test.htm -- RS This works on Opera while still working on IE and Firefox. Does it work on Konqueror?
html4strict Code: Original - html4strict Code <style type="text/css"> wbr { display: inline-block; width: 0; overflow: hidden; } .test { width: 150px; } </style> <div class="test">This<wbr />sentence<wbr />is<wbr />really<wbr />just<wbr />one<wbr />big<wbr />hillariously<wbr />long<wbr />word.</div> <style type="text/css"> I've uploaded a test page re how do I get a content div to scroll under [apologies for new thread]. It renders fine in Camino-Shiira, Safari, iCab, Firefox, IE Mac 5.2x, but not too good on Opera 8.52 Mac [fuhgeddabout Netscape 4x]. 1) Can someone provide some feedback on how it renders in Windows IE/FF? 2) Is the CSS a reasonable structure to convert the other pages of my site to? The template would be a fixed sidebar, fixed clock header (different-pages different-heights) and relatively positioned content. Two of the javascript clocks and the table are running ahead of time in debug mode. The test page is [obsolete link deleted]; clicking w3c css validator at bottom shows .css file. Issues in Opera-Mac indicate all is not well: a) table is one to two pixels wider (cut-off by overflow: hidden) b) scrolling table div eventually "catches" and drags fixed header when it scrolls. c) anchor "top" doesn't work from the bottom link. Since it's in the news since a few days that the upcoming Internet Explorer 7 will not be passing the Acid Test meant to demonstrate browser support or lack thereof for CSS2, I thought I'd humor everyone and post results from a quick experiment on how the four main browsers on Windows platfrom performed. In order of success, reference image first: Click here to view screenshots in full size Note the "ERROR" texts in Opera and IE. Ironically, despite The Opera Challenge to Microsoft in the Acid2 ring, Opera performs sub-standard itself. ASP css database List menu. Tested in IE6, IE7 and Firefox OK. Check it out and respond to my blog if problems. Has single click editing of menu items, iframe masks over objects, SQL server and access databases supplied and ready to test. css List database Menu version 1.0.0 : being a new forum user I cannot add url links, so copy and paste blog address below rwstewart.blogspot.com How do i change img button to 3d on hover or mouseover using css. Please advise. thanks http://warcraftpress.com/theme/theme.html I'm trying to have #footer be pushed down instead of the menu lapping over it. Basically, I want the menu to push it down, but it just overlays it. Thanks Hi guys, can you give me some tips to centering a block (<div>) of code? I would like it centered vertically and horizontally and I would also like the background of the element centered (so the whole thing). text-align doesn't work, it only centers the text, not the element. Thanks, Josh Hi, im trying to create a block of colour of various width. Im trying to do it with <span> like so <span style="background-color:#336699; width:100px"></span> Now why wouldnt that work and is there a better way to do what im trying to achieve? In the attached gif, you should be able to see exactly what I mean, if I don't explain it well enough. I have a containing block, #content_main, defined as such: Code: #content_main { margin-left: 170px; padding: .5cm .25cm 50px; } Headers (h1, h2, h3, etc) are used inside #content_main and are defined like this: Code: h1, h2, h3, h4, h5, h6 { font-family: georgia, serif; border-bottom: 1px solid #009; } If you look at the attached gif, you'll see the problem. The top one is what happens. It extends the border-bottom to the width of the containing block, even though it places the text correctly. The second one "Something Else" is what I want it to look like. I edited that with Fireworks. Since it renders the same in Firefox and IE, I figure it's my code that's wrong. Any thoughts? MPEDrummer I have this CSS for my "globalNav" class: .globalNav {width: 217px; background-image:url(images/barbackground.jpg); background-color: #1B619E; background-repeat: repeat-x; border-right: 1px solid #075284; position: absolute; left: 0px; top: 125px; height: 450px} .globalNav A {background-color: #004E82; border-top: 1px solid #407AA1; border-bottom: 1px solid #00375C; border-right: #00406B; color: white; font-weight: bold; padding: 2px 5px 2px 5px; text-decoration: none; display: block} This is my code for globalNav: <div class="globalNav"> <a href="#">Global 1</a> <a href="#">Global 2</a> <a href="#">Global 3</a> <a href="#">Global 4</a> <a href="#">Global 5</a> <a href="#">Global 6</a> </div> For whatever reason, display block won't work in IE unless I remove the width, height, and positioning. Anyone know any tricks to make this work? Hi guys I was just wondering why cant i see these two <b></b> "blocks" on each side of my <UL> block in ie6 but in Firefox i can? Screenshot of situation: here is my code for the <b> blocks: PHP Code: .navbar b.lefty { display:block; position:absolute; z-index:604; height:100%; width:20px; top:0px; left:-20px; padding:0; margin:0; background-color:#ffffff; } .navbar b.righty { display:block; position:absolute; z-index:604; height:100%; width:20px; top:0px; left:136px; padding:0; margin:0; background-color:#ffffff; } Here is my code for the <UL> block: PHP Code: .navbar :hover ul { z-index:604; width:136px; top:40px; left:0px; padding:0; margin:0; background-color:#333333; text-align:left;} Now here is my HTML: PHP Code: <ul> <b class="lefty">d</b> <li><a href="#">Link</a></li> <li><a href="#">Link</a></li> <li><a href="#">Link</a></li> <li><a href="#">Link</a></li> <li><a href="#">Link</a></li> <b class="righty">d</b> </ul> I would like to have a table with 6 td's across and the 7th td to break line and default to under neath the first td. I tried using display block and firebug outline the area where my content should be but it is still to the right of the 6th td. I would just like to do this to keep it in the same row so i can hide and show it dynamically outside of those first 6 td's. i coudnt find the forum search feature...? but anyone help with wht i am doing wrong? much appreciated Hi Guys, I have a generic Question/Problem to do with a Block Element (in this case a div) in an li tag. This seems to be a problem in browsers like IE8 and Safari but not IE7 and the latest FireFox version. Where with the div item 'drops down' a line from the li bullet. Like this (. is the li): . Here is My Div Content I want it to be like this: . Here is My Div Content Now this only doesn't happen if I just have plan text between the div with no class, so I'm thinking that something in my css dragHandle class may be at fault. Either that or I need to add something to it to do with float or display: line or block etc? Any thoughts or ideas are most appriciated (note I'm using a div in an li as I'm using the AJAX reorder list control and need something for a 'drag handle' to select an item in the list. The reorderlist uses ul and li to display itslef to I have to use this markup structure). Here is my markup. <ul> <li> <div class="dragHandle"> </div> </li> </ul> DragHandle class is as follows .dragHandle { width: 20px; height: 25px; background-image: url(/styles/icons/selectarrow.JPG); background-position: center; background-repeat: no-repeat; cursor: move; } I have a div block which contains links on the left, it is using absolute positioning, I want to have the contents div block on the right, I want it 20 pixels away from the right border and 20 pixels away from the left div block, so if I resize my left div block, my right div block is always 20 pixels ahead of it. The code is included below: Code: <div style="position:absolute; top:20; left:20; width:200; height:200; z-index:1; padding:3px; border: #0000FF 1px solid; background-color:#FFFFFF;"> <div align="left">- <a href="#1">News</a></div> <div align="left">- <a href="#3">FAQ</a></div> <div align="left">- <a href="#2">ABC</a></div> <div align="left">- <a href="#6">Forums</a></div> <div align="left">- <a href="#7">Contact</a></div> </div> <div style="position:absolute; top:20; left:235; right:20; z-index:1; padding:3px; border: #0000FF 1px solid; background-color:#FFFFFF;"> <div align="left">Caption</div> <div align="left">bla bla bla This is the right side. </div> </div> So, I'm trying to figure out the proper way to use display:block based on what my needs are. My needs: I'm wanting to create essentially a box with a header, image, and paragraph inside. I want to make it so that when any part of the box is hovered over, it is essentially a link... (changes text color when hovered over). However, I know certain elements aren't supposed to go within <a> tags, such as <h3>, <div>, <p>, etc.... In IE, when I do it this way, using those tags inside the <a href> tag, it works fine. However, in FF, some of the elements aren't applied.... For example, I have 3 boxes of equal length, which all have the same CSS classes, just different content. When I load the page in FF, 1 of the 3 will make the header, image, and paragraph seperate links, and not use the class I have set for it. (The 1 of the 3 isn't always the same... it could be the first box, or second box, or even third box). Sorry for the vagueness, but I'm trying to explain the best I can... If you need to see the code (or site), let me know... Because of the business I'm creating this for, I can't publish it's link until they launch officially. But I can create another page that has the same code to show you what is going on. If you need further clarification as well, just let me know. Thanks. I'm trying to put an icon next to a block of text, but I have a bunch of strange width problems. I'd like it to be directly next to the news story, but without the text wrapping. So far, my solution causes the gap between the icon and the text to get really huge as resolution increases. What I want is for the icon to be about 20 or 30 pixels away regardless of the resolution. Any simple way for me to do this? I'm still trying to get the hang of all this CSS stuff. News page: http://www.brickfilms.com/ Story code: Code: <div id='newsItem'><img src="<?echo $icon;?>" width="64" height="64" class="newsIcon"> <div id='newsText'> <h3 class='newsTitle'><?echo $title;?></h3> <p class='newsStory'><i>by <?echo $author;?>, <?echo $date;?></i><br> <?echo $story;?> </p> <br></div> </div> The CSS is at http://www.brickfilms.com/brickfilms.css Thanks in advance. Hi, I am still quite new to CSS so forgive me if this is a silly question but I have created a DIV layout that look something like Code: <div class=row><div class=square>A</div><div class=square>B</div><div class=square>C</div></div> In the CSS "row" is designated as display type BLOCK "square" is designated as "INLINE-BLOCK" in safari, firefox etc this comes up showing the A,B & C next to each other in their own styled boxes. This is how I want to be. However in Internet Explorer (currently testing it on v8), the A ,B and C show up , one underneath the other in a straight line down the page. This is not cool. To fix this issue, I tried changing the inline-block to just "inline" This works fine now in IE, the squares are next to each other like i wanted, but now when I test it on safari,firefox, the boxes go straight down the page! Am I missing something here? I would rather not make a special style sheet for IE if there is a solution that will help make it work on all three browsers. It just seems strange that the display types are working completely opposite to each other . Any help would be appreciated. below if the full CSS rules if that helps any Code: .row { width: 100%; height: 30px; display: block; font-size: 14px; text-align: center; font-family: "Lucida Grande", Verdana, Arial, sans-serif; } .square { display: inline-block; background-color: #eeeeee; line-height: 30px; height: 30px; width: 30px; border-width: 1px; border-color: #000000; border-style: solid; } |