HTML question
- Started
- Last post
- 17 Responses
- oey0
BUMP!
- BabySnakes0
font-size: 0; for the Image container if you have no control of the markup output.
- vaxorcist0
One thing to check, is the Sharepoint 2007 system re-writing your code before it goes to the browser?
comment your code or use DIV names like div id="myname-part1" so you can more easily compare source code between the LIVE version and what you think you wrote into the CMS....
- ArmandoEstrada0
<div class="myimage">
<img src="http://placekitten.com/g/200/200">
<img src="http://placekitten.com/g/200/200">
</div>.myimage img{
display:table-cell;
margin:0;
padding:0;
float:left;
}http://codepen.io/macisbetter/pe…
????
- CygnusZero40
That worked rendered, but all I used was the code in the style tag on only the top image, so Im not sure why that fixed it. Thanks though.
- CygnusZero40
Very sure, I made them myself. Ive tried everything mentioned here, they wont butt up right next to each other, touching each other. So irritating.
- renderedred0
this has to work:
<div><img src="1.jpg" style="float:left;margin:0;padding:0;display:block;"><img src="2.jpg" style="float:left;margin:0;padding:0;display:block;"></div>
- renderedred0
Are you sure the images have no margin in the files? Like a white border?
- CygnusZero40
Borders and margins set to 0. Just insists on there being about 5px or so of space between. And Im not using CSS at all, since this code is just being pasted into a sharepoint 2007 source editor.
- IRNlun60
Yes, should be possible.
Floating images will align them horizontally with no space, but the parent container for all images needs to be cleared.
If you're using display: inline-block to align images horizontally, there's a 4px space added. You can either margin-right: -4px; or remove space between elements in html which is not always ideal...
- vaxorcist0
there may be some stylesheet already setup that has a built in margin, so you may have to over-ride it locally
<div><img src="1.jpg" style="margin:none;"><img src="2.jpg" style="margin:none;"></div>
or something like this....
- ukit20
Just make sure margin, padding are both set to zero and that there is no border around the image. Use web inspector tool and you can see what styles are being applied.
- dibec0
<div><img src="image1.jpg"/><img src="image2.jpg"/></div>
- brandelec0
be default it should. there may be a border or margin set in CSS perhaps?
- CygnusZero40
Internal for a massive company, cannot be shared.
- ArmandoEstrada0
link?
- CygnusZero4
Is it possible to butt 2 images right up against each other? The page seems to be forcing about 5px or so of space in between them.