Miscellaneous > Programming & Networking
Smartarse html question
Calum:
ok, please look at http://www.polytheism.org.uk/
now see how i have done the picture there? it's aligned right, and has a caption beneath it. the caption is part of the image. This is fine as far as it goes however how can i make it so it will work like that, but use real text?
ie: i want the image aligned right, the caption beneath it also aligned right (but possibly centre aligned beneath the actual image) and the caption text should not get mixed up in the body text. Tables would seem to be the answer, but can i use tables and still have the text flowing round the image? when using different default text sizes in different browsers (because IE and moz have very different ideas of proper font sizes, and people have different sized monitors) i want it to look "okay" on everybody's screens, so if possible i would like to avoid large spaces of background colour where text should be flowing round the image, and i want the text to not overlap or anything.
Is this possible? if so, is it easy? and how?
or should i continue to just integrate the text into my images? (this method is tiresome since any change in colour or font on the site necessitates a revamp of the image, also the font on the image is rarely the same as that the reader sees the page in).
So, any suggestions?
thanks in advance.
flap:
This is one way to do it; there may be a better one. Where you have your img tag, replace it with this:
--- Code: ---
--- End code ---
Calum:
thank you, that's nice and easy and it works, also it saves me having to ask the next question which was going to be how to get an invisible border round the image (which of course i know how to do with tables)
jasonlane:
better if you do borders, etc... well any styling with CSS, it's lighter, less code
;)
Calum:
i am quite new to css to be honest. i now include fonts and stuff in the <head> part of new documents, but have not got round to finding out how to have a separate stylesheet so i can just have one for a whole site.
Navigation
[0] Message Index
[#] Next page
Go to full version