Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-19-2012, 04:31 AM   PM User | #1
jim5358
New to the CF scene

 
Join Date: Jan 2012
Posts: 9
Thanks: 4
Thanked 0 Times in 0 Posts
jim5358 is an unknown quantity at this point
Unhappy Heeeeeellllllllp!!!! - Please!!

Hi everyone.

This is my first shot at building a site from scratch in HTML, though I did cheat and use a blank template from Adobe Dreamweaver.
I inserted a slider widget which I really liked from the exchange, but my pictures have come out really small. When I edit the CSS rule to increase their size (which I am doing by increasing the % - is this correct?) then the slides stick out of the right hand side of the centred 'block' design, and I cant get them to 'justify' to the centre again. Ideally, I'd like the picture display to be the same size as the google maps image on the 'about us' page.
I've spent hours tweaking and adjusting as I'd like to learn how to do this, but cant for the life of me get it going. I'd also like for my 'box' design to be centred vertically - but I've not tried that yet and dont want to be greedy! I would very much appreciate any help/advice you can give me - it's driving me NUTS!
The site in question (please forgive the colour scheme!) is:

www.chrisandersonarchitects.co.uk
jim5358 is offline   Reply With Quote
Old 01-19-2012, 07:46 AM   PM User | #2
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,680
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Please follow the second guideline at http://www.codingforums.com/postguide.htm, regarding thread titles. You may edit your thread to provide a meaningful title. Thanks.
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Old 01-19-2012, 08:17 AM   PM User | #3
Arbitrator
Senior Coder

 
Arbitrator's Avatar
 
Join Date: Mar 2006
Location: Splendora, Texas, United States of America
Posts: 2,900
Thanks: 5
Thanked 188 Times in 185 Posts
Arbitrator is on a distinguished road
Quote:
Originally Posted by jim5358 View Post
When I edit the CSS rule to increase their size ... then the slides stick out of the right hand side of the centred 'block' design, and I cant get them to 'justify' to the centre again.
If you've sized the image such that it's larger than its container, overflow will occur on the right side of the container. There is no current mechanism to "justify" the overflow such that it occurs evenly on the right and left sides of the container insofar as I'm aware.

Quote:
Originally Posted by jim5358 View Post
(which I am doing by increasing the % - is this correct?)
Size the image to the desired size in an image editor, then specify the image dimensions in the HTML. For the current image, your code would be as follows:

Code:
<img alt="Put appropriate fallback text here." width="800" height="504" src="images/Slideshow/Index/homeslide.jpg"/>
Resizing images via CSS is bad practice. This is especially the case with resizing images to be smaller since the full image (with its corresponding file size) must be downloaded; in other words, it's a waste of bandwidth and makes your pages load slower. Doing the opposite—resizing images to be larger—results in pixelated images as the image viewer must synthesize missing image information.

If you want, you can set the size in the CSS instead of the HTML, but, again, the size should match the actual dimensions of the image:

Code:
img[src="images/Slideshow/Index/homeslide.jpg"] { width: 800px; height: 504px; }
I would recommend pixels over percentages as far as images go.

Quote:
Originally Posted by jim5358 View Post
Ideally, I'd like the picture display to be the same size as the google maps image on the 'about us' page.
I have no idea where to find this "google maps image on the 'about us' page."
__________________
Please for the love of god stop making IE. You current "browser"s cause me to cry every day. —Phil *
Arbitrator is offline   Reply With Quote
Users who have thanked Arbitrator for this post:
jim5358 (01-20-2012)
Old 01-20-2012, 01:48 PM   PM User | #4
jim5358
New to the CF scene

 
Join Date: Jan 2012
Posts: 9
Thanks: 4
Thanked 0 Times in 0 Posts
jim5358 is an unknown quantity at this point
THANK YOU!! I sincerely appreciate you both taking the time to answer my question!s I hope soon to be able to repay this by helping some other people out on here - as long as its basic enough!

Quote:
Originally Posted by Arbitrator View Post
If you've sized the image such that it's larger than its container, overflow will occur on the right side of the container. There is no current mechanism to "justify" the overflow such that it occurs evenly on the right and left sides of the container insofar as I'm aware.

Size the image to the desired size in an image editor, then specify the image dimensions in the HTML. For the current image, your code would be as follows:

Code:
<img alt="Put appropriate fallback text here." width="800" height="504" src="images/Slideshow/Index/homeslide.jpg"/>
Resizing images via CSS is bad practice. This is especially the case with resizing images to be smaller since the full image (with its corresponding file size) must be downloaded; in other words, it's a waste of bandwidth and makes your pages load slower. Doing the opposite—resizing images to be larger—results in pixelated images as the image viewer must synthesize missing image information.

If you want, you can set the size in the CSS instead of the HTML, but, again, the size should match the actual dimensions of the image:

Code:
img[src="images/Slideshow/Index/homeslide.jpg"] { width: 800px; height: 504px; }
I would recommend pixels over percentages as far as images go.

I have no idea where to find this "google maps image on the 'about us' page."
jim5358 is offline   Reply With Quote
Reply

Bookmarks

Tags
css, html, jslider, widget

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:39 AM.


Advertisement
Log in to turn off these ads.