HTML & CSS - inlining a block element
They tricked me into doing HTML and CSS, and I've run into a lil' problem.
What I want to do is the following: "Howdy, please press button (1) to continue" where "(1)" is an image of a button 1. This is what my logic came up with: Code:
I'm thinking of using <img> tags instead, that would inline properly, but I would lose the advantage of defining the images in the CSS file, right? So is there a way to keep the image url in the css, AND inline properly? |
Re: HTML & CSS - inlining a block element
Replace the div with span?
The div tag is a block level element, span is an inline element. |
Re: HTML & CSS - inlining a block element
Quote:
|
Re: HTML & CSS - inlining a block element
Sorry! This however explains how to do it.
|
Re: HTML & CSS - inlining a block element
Aha, that is rather interesting...
I tried the inline-block before, but FF does not recognise the inline-block keyword for the display parameter. But in that example I see the ":before" selector to insert the image. I never heard of that selector before, but that would work I guess. |
Re: HTML & CSS - inlining a block element
Personally I stand by my signiture, CSS is just plain evil (though sadely a necessary evil).
|
All times are GMT +1. The time now is 01:45. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2018