This question already exists:
Closed 10 years ago.
Possible Duplicate:
Styling native tooltip from title=“Tooltip text”
Is any way to control browser tooltip in CSS.
like adjust height and width .. something
-spk-
Not for the built in tooltips with title, no.
You can create tooltip-like constructs of your own, though, by using a div (or anything) that is hidden until the user hovers over your element. See the :hover pseudo-class.
Related
This question already has answers here:
Is there a CSS parent selector?
(33 answers)
Closed 2 years ago.
I have:
<div id="header"><button id="button1"/></div>
<div id="footer"></div>
Can I change (just in css, not js) the layout so button1 belongs to footer?
If this is not possible are there alternatives? (such as flex order allow dynamically to change the order of elements). My goal is to propose many different themes of an application without to modify the DOM layout (e.g. some people want the button to be in header, other prefer in footer).
Can I change (just in css, not js) the layout so button1 belongs to footer ?
In a word, no.
What you are trying to do is change the actual structure of the page, which is not what CSS is for. CSS is (for the most part) about controlling the visual aspect of a web page, and HTML is for the structure. You could, I suppose, apply CSS styling to make the button appear as though it were a child of #footer (you might set position: relative and give it the appropriate offset so that it appears where it would have appeared if it were), but that’s hardly a reliable solution.
If you find yourself needing to do this, perhaps pure CSS is not really the appropriate solution? Could you offer the themes in the form of styles and scripts (where you could use the script to move the button)? Or perhaps offer HTML templates to be chosen from (e.g. whether the button should be in the header or footer), and then apply the CSS theme on top of that.
This question already has answers here:
How are the points in CSS specificity calculated
(7 answers)
Why are my CSS properties being overridden/ignored?
(5 answers)
How can I detect overwritten css properties?
(3 answers)
Closed 3 years ago.
I am using timeline.js to add a timeline to my page. Unfortunately the width of an element with class .tl-slide-content is set somewhere I cannot see. As a result, the width is 940px or 448px depending on viewport width. This is causing issues with how the text next to the photo is being displayed.
I have tried selecting the element with every ascendant class available, including any IDs that I could find. Still there is no change and I am unable to figure this out.
What I want to know is this:
what is 'element' in this context?
are there tools in the developer console that enable me to find where width is being set to 940px?
If anyone has any experience with this particular library and could point me in the direction of the appropriate selectors that would be fantastic
I have tried putting my stylesheet after the timeline, I even tried putting it right at the bottom of the body tag. Still no change.
The 'element' selector is displaying all the properties set by the inline styling within the HTML file itself. Inline styles supersede all other styling because of cascading (first to last). Last iteration is displayed.
You can see the word inline to the right of the 'element' box.
If you do not have write access to the HTML file you are working with then you may need to use !important after your width: 100%. This is really a last resort.
My suggestion is to look at their CSS source code:
https://github.com/NUKnightLab/TimelineJS/tree/master/source/less
Overwriting their CSS would just bloat your code.
Duplicate the library(if you intend to use it again) and then use the duplicate to internally mess with their source code to achieve the results you want.
I know I didn't give you a direct answer, but libraries typically have their own conventional styling, etc. without looking at the source you're just guessing...
This question already has answers here:
How to make a child div transparent?
(2 answers)
Closed 5 years ago.
So as exposed in the title, i'd like to make a part of a container transparent, but only where there is another div, I know I can't tell it clearly, then I made an example :
I don't know if it is possible doing this, using ONLY CSS, I can't use JQuery, not even Javascript.
Thank you in advance for your answers :)
No, this can't be done with CSS alone. However, as CBroe has said, you could apply the same background image to the second/inner to give the illusion that it's transparent.
This question already has answers here:
Is there a CSS parent selector?
(33 answers)
Closed 9 years ago.
I am creating a print stylesheet and would like to hide all figure tags only if that tag contains an iframe, which happen to be embedded YouTube videos. If the figure tag contains anything else (i.e. an img), I want the tag and its contents to still be shown on the printed page.
I know that I could simply apply a class of "video", for example, to my figure tag where appropriate, but I want to see if there is a way to accomplish this via CSS without resorting to adding classes throughout my site. Also, even though I know they exist, I am not looking for a jQuery solution.
Thank you!
You are looking for a parent selector
CSS3 has none, but CSS4 has one that is like selecting using $.
Here are some similar questions with similar results:
Is there a CSS parent selector?
CSS Parent/Ancestor Selector
Complex CSS selector for parent of active child
This question already has answers here:
CSS customized scroll bar in div
(20 answers)
Closed 7 years ago.
I tried searching online but I didn't find any good sources on this. Is there a way to style scroll bars with pure CSS so that it is compatible with a maximum number of browsers?
You can style scrollbars in Internet Explorer and Webkit only.
Note that these are not standard properties.
However, you can achieve this with JavaScript. One project that does this is jScrollPane.
Adding my 2 pence a little late, but if you really want to style them I would suggest trying http://jscrollpane.kelvinluck.com/. It's not a pure CSS solution like you are looking for but is a solution of sorts.