![]() |
CSS to keep images left (and not nesting)
Anyone know the CSS to keep images to the left? I've got some small images which I'm using as a kind of bullet with text to the right. Problem is when there isn't enough text to push the next image over to the left. Then they nest properly, but it's not what I want.
This is the css I'm using.... Code:
img.check {This is what I don't want.... https://handycrowd.com/wp-content/up...enshot-365.jpg I want it to look like this, even for the images with only a line or two of text... https://handycrowd.com/wp-content/up...enshot-366.jpg Ta muchly to anyone who can spare me a minute :-) Cheers Ian |
You may want to add clear to your img.check CSS:
Code:
clear: bothCode:
clear: lefthttps://www.w3schools.com/cssref/pr_class_clear.asp or on Mozilla's site: https://developer.mozilla.org/en-US/docs/Web/CSS/clear |
Quote:
Good to know, I had a play and it works perfectly with the images, stacking them on top of each other. But unfortunately each image doesn't keep the text alongside. https://handycrowd.com/wp-content/up...lipboard01.jpg I'm wondering if I should just find each image which has little text and add some padding to the bottom! Clumsy but it might be the easiest. Cheers! |
It might work if you put image and the text that goes with it in a <div class="clear"> together. I just tried the following code on the W3C site, and there it does what you want it to do:
Spoiler:
Just put the code in the test window on the left here: https://www.w3schools.com/cssref/try...ss_class-clear and hit the green "Run" button. |
Yes DS,
I figured doing that might work also as it would create a series of blocks like lines on a page I guess. On balance though, there are not many of the images which have short descriptions so I might just go back and 'pad out' the text lol! Thanks again for making the time... |
Now I'm interested: How exactly would you pad out the text?
|
FYI: This is a generic epub topic and has nothing to do with Sigil itself. Therefore, this discussion would be better located in the "epub" forum. Please continue any further discussion on this topic in that forum.
|
adding space to text
Quote:
Quote:
This time though I'm following your idea! I'm wrapping each <p> within <div> tags and that separates everything brilliantly. Bit time consuming but once you get into a rhythm... Bear in mind I know next to nothing about HTML and CSS, only what I bumble though trying to put together ebooks... |
Quote:
|
1 Attachment(s)
Quote:
Code:
<div class="clear">\1</div>Then make sure you can see your Clips bar: View > Clips. I drag mine in the lower left corner: Attachment 163631 now when you highlight text, you can press on the "Div Clear" clip, and it will wrap the div around it. So this: Code:
<p><img src="TestImage"/> This is a sentence.</p>Code:
<div class="clear"><p><img src="TestImage"/> This is a sentence.</p></div> |
| All times are GMT -4. The time now is 05:37 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.