Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Digital Lifestyle
Web Design and Hosting
centre a sliced image from photoshop into dreamweaver cs4
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="bexxy" data-source="post: 901238" data-attributes="member: 119066"><p>I might be an idiot (I often am!) but I encountered the same trouble recently and tried this which seemed to work a dream. As gomez1018 says you will need to use a parent div to centre the whole image and then put the splices into this.....</p><p></p><p>Try:</p><p></p><p><div style="width:100px; height:100px; position<img src="/images/smilies/angel.gif" class="smilie" loading="lazy" alt=":a" title="Angel :a" data-shortname=":a" />bsolute;top:50%;left:50%;margin-top:-50px;margin-left:-50px;"></div></p><p></p><p>So: adjust the width and height to whatever the complete image you have is. Leave the top and left thingies at 50%. However, what this means is that you are asking the top left corner of the div to be bang in the centre of the browser.... not what you're wanting I think. So then the margin-top and margin-left things come in...... in the above they are at -50px as the whole image is 100 x 100 px so if they are both placed at -50px it will centre it. Obviously if your image is 250 px wide you will change that value to -175px. Once you've got that container div sorted you can insert others into it...... </p><p></p><p>Hope that helps - I'm not very good at explaining but if you think it looks like the type of thing you are after let me know and I'll give you the address of a site that I did which uses this....</p><p></p><p>All the best</p><p>Bexxy</p></blockquote><p></p>
[QUOTE="bexxy, post: 901238, member: 119066"] I might be an idiot (I often am!) but I encountered the same trouble recently and tried this which seemed to work a dream. As gomez1018 says you will need to use a parent div to centre the whole image and then put the splices into this..... Try: <div style="width:100px; height:100px; position:absolute;top:50%;left:50%;margin-top:-50px;margin-left:-50px;"></div> So: adjust the width and height to whatever the complete image you have is. Leave the top and left thingies at 50%. However, what this means is that you are asking the top left corner of the div to be bang in the centre of the browser.... not what you're wanting I think. So then the margin-top and margin-left things come in...... in the above they are at -50px as the whole image is 100 x 100 px so if they are both placed at -50px it will centre it. Obviously if your image is 250 px wide you will change that value to -175px. Once you've got that container div sorted you can insert others into it...... Hope that helps - I'm not very good at explaining but if you think it looks like the type of thing you are after let me know and I'll give you the address of a site that I did which uses this.... All the best Bexxy [/QUOTE]
Verification
Post reply
Forums
Digital Lifestyle
Web Design and Hosting
centre a sliced image from photoshop into dreamweaver cs4
Top