I do use simple table for the tabs at the top. Can't get css to do that reliably.
Aaaagh! Just uploaded and I had done the whole website with images\ instead of images/. Fussy flippin Firefox.
- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Reply to: Inline images css problem
Collapse
You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
- You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
- You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
- If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Logging in...
Previously on "Inline images css problem"
Collapse
-
If tables work for you and you don't do this for a living, just use tables. Just don't tell any web developers I said that
Leave a comment:
-
Ta Nick. Putting them inline AND not having float seems to work. Thanks to both of you.
PS I could have sworn imgs without float appeared one after the other. I've been using tables or align= or css to get them inline for years. Just as well I don't do this stuff for a living.Last edited by xoggoth; 22 June 2010, 07:45.
Leave a comment:
-
Originally posted by xoggoth View PostPS Ok in Firefox. Margin:-3px works in IE, Sucky. Must be better way.
Two possible solutions:
- Don't bother floating them: images are inline elements by default, and should just appear on the same line anyway when rendered. In a number of ways they're the same as individual characters in a word to the rendering engine ("inline replaced elements" is the technical term used in the CSS spec). If you're setting display: block; on them somewhere, taking that out and only applying it to images that need it is probably the way to go, along with Jaws' suggestion of putting them all on one line in the source, with no whitespace between them. (The whitespace caused by the line-endings will be converted to a space according to the rules for parsing HTML. You'd need to do that anyway whether in Netscape 3 or IE9: to the HTML parser, any contiguous sequence of whitespace characters is collapsed to a single space character. Dem's de rules - well, in most cases )
- Alternatively, leave the floating rules in place and add zoom: 1; to the CSS rules applying to those images. IIRC there are additional complexities in this foul IE bug for inline replaced elements, so that might not work: I'll have a play tomorrow, but give zoom a go. I seem to remember that the ugly margin-left: -3px; hack can under some circumstances be the only way to work around IE6's miserable fail, in which case you should be serving that in an IE6-specific stylesheet via conditional comments. (The zoom rules can just be served to everything, as they won't break anywhere.)
Not actually a problem with CSS, just a problem with IE6 being a donkey-knob-sucking pile of tulipe
Leave a comment:
- Don't bother floating them: images are inline elements by default, and should just appear on the same line anyway when rendered. In a number of ways they're the same as individual characters in a word to the rendering engine ("inline replaced elements" is the technical term used in the CSS spec). If you're setting display: block; on them somewhere, taking that out and only applying it to images that need it is probably the way to go, along with Jaws' suggestion of putting them all on one line in the source, with no whitespace between them. (The whitespace caused by the line-endings will be converted to a space according to the rules for parsing HTML. You'd need to do that anyway whether in Netscape 3 or IE9: to the HTML parser, any contiguous sequence of whitespace characters is collapsed to a single space character. Dem's de rules - well, in most cases )
-
Thanks Jaws but tried that one, no joy. Also tried using inline <li>, putting them in divs and checked got up to date <!DOCTYPE
Leave a comment:
-
Try putting all the images on the same line so there is no whitespace (the carriage return) between them.
edit: Additionally, try removing the float: left you have in your css, there should be no need to do that with images because they are inline elements. (I just attempted this with your html and it appears to solve the problem).Last edited by Jaws; 21 June 2010, 21:35.
Leave a comment:
-
Inline images css problem
Never have these problems with tables, css sucks. Just trying to line up a row of images as below but just cannot get rid of spaces between them, in IE anyway.
<style type="text/css">
.content {float:left; margin:0px; padding:0px;}
.content img {float:left; margin:0px; padding:0px;}
</style>
blah, blah, head, body, etc
<div class=content>
<img src="image_files\gallery1.jpg" border=0 title="">
<img src="image_files\gallery2.jpg" border=0 title="">
<img src="image_files\gallery3.jpg" border=0 title="">
<img src="image_files\gallery4.jpg" border=0 title="">
<img src="image_files\gallery5.jpg" border=0 title="">
</div>
Any ideas? Cheers.
PS Ok in Firefox. Margin:-3px works in IE, Sucky. Must be better way.Last edited by xoggoth; 21 June 2010, 21:13.Tags: None
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers
Contractor Services
CUK News
- Streamline Your Retirement with iSIPP: A Solution for Contractor Pensions Sep 1 09:13
- Making the most of pension lump sums: overview for contractors Sep 1 08:36
- Umbrella company tribunal cases are opening up; are your wages subject to unlawful deductions, too? Aug 31 08:38
- Contractors, relabelling 'labour' as 'services' to appear 'fully contracted out' won't dupe IR35 inspectors Aug 31 08:30
- How often does HMRC check tax returns? Aug 30 08:27
- Work-life balance as an IT contractor: 5 top tips from a tech recruiter Aug 30 08:20
- Autumn Statement 2023 tipped to prioritise mental health, in a boost for UK workplaces Aug 29 08:33
- Final reminder for contractors to respond to the umbrella consultation (closing today) Aug 29 08:09
- Top 5 most in demand cyber security contract roles Aug 25 08:38
- Changes to the right to request flexible working are incoming, but how will contractors be affected? Aug 24 08:25
Leave a comment: