LambdaEnt Posted April 4, 2016 Share Posted April 4, 2016 (edited) Unwanted space is added between images when HTML 5 encoding is specified in header: <!doctype html> but not when XHTML 1.0 Transitional is: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> The ONLY difference in the code is the header HTML specification. I am using SSI via SHTML. Note the spacing of the images on the right panel, as well as the space added under the image at the top left. This one is XHTML 1.0 and what I want out to look like: http://www.wordsforall.org/12/pages/1/a.shtml This one is HTML 5: http://www.wordsforall.org/12/pages/2/a.shtml Any suggestions? Thank you! Edited April 5, 2016 by LambdaEnt Link to comment Share on other sites More sharing options...
Ingolme Posted April 5, 2016 Share Posted April 5, 2016 In XHTML transitional the browser runs in "almost standards" mode. This mode behave almost exactly like standards compliant mode, except that images inside table cells have the space below them stripped. You can correct this with CSS by setting the image's vertical-align property to "middle". Your page takes a really long time to load. If you want your page to load faster you're going to have to resize all those image files in an image editor to make them as small as they display on the page. You should consider fixing all validation errors given by the W3C validator: https://validator.w3.org/ Link to comment Share on other sites More sharing options...
LambdaEnt Posted April 5, 2016 Author Share Posted April 5, 2016 (edited) What might be the appropriate CSS for this? Class, DIV?? This site is not "live" yet, so the images have not been optimized. Thank you! Edited April 5, 2016 by LambdaEnt Link to comment Share on other sites More sharing options...
Ingolme Posted April 5, 2016 Share Posted April 5, 2016 Just use a CSS selector that can target those images ( table img would probably work) and then set their vertical-align property to "middle". Link to comment Share on other sites More sharing options...
LambdaEnt Posted April 5, 2016 Author Share Posted April 5, 2016 Worked! Awesome. Thank you so much. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now