HTML - Make Image Halt Its Size?
Instead of using width/height in pixels to make an image smaller, is it possible to make it 50% its size?
Similar TutorialsIve got this nice 900x600 transparent background for my website.. but its 1,2 MB large...... Im guessing its too large to load in an acceptable amount of time.. So, ive tried saving it for the web & devices.. and, well.. PNG 8bit sucks. It doesnt support transparancy? Anyone know what to do? What program to use? I want to keep the quality, dimension, and format (since PNG is the only one who supports transparent shizz right?) Cheers, thank you Hi! I have a page that contains a text area. What I want it to do is to change its size according to the size of the browser window. How can I make it do that? I did it once but just can't seem to remember how I did it. Thanks All: Working to update a previously designed website. Original design uses an <img> tag to create a top banner and another <img> tag to create a side banner. In each case there are mapped coordinates on each banner as links for the subsequent pages. Basic page design is as follows: Code: <table> <tr> <td> <img usemap="Map1"> <map name="Map1"> <area> <area> <area> </map> </td> </tr> </table> <table> <tr> <td> <img name="Map2"> <map> <area> <area> <area> </map> </td> <div> ***PAGE CONTENT*** </div> <tr> <table> The challenge is that the [PAGE CONTENT] varries in length througout the site causing some pages to be much longer or shorter than others. This causes some inconsistencey in the relationship between the side banners height and the page content. In other words in some cases the banner is exceptionally longer than the page content and the reader must scroll past significant "dead-space" before being brought to the lowest mapped links in the side banner; or... ...in some cases the side banner is significantly shorter than the page content causing the banner image to appear "poorly-fit" to the page design. I considered altering the 2nd table instance in the above design so that the banner is carried in a <td> tag that is adjacent to the page content and hopefully to allow the tag carrying the image to size relative to the <td> tag carring the content.... Code: <table> <tr> <td> <img usemap="Map1"> <map name="Map1"> <area> <area> <area> </map> </td> </tr> </table> <table> <tr> <td size="100%"> <img name="Map2"> <map> <area> <area> <area> </map> </td> <td size="100%" > <table> ***PAGE CONTENT*** </table> </td> <tr> <table> The problem I've found with this is that as the content size causes the image to "flex", either readablilty or image quality or both are effected, AND the mappings become inconsistent as the image coordinates constantly change. I've considered 2 solutions and am leaning toward one, but thought I'd post this and see if there are better ideas I'm overlooking. One idea was to add additional table rows inside the [PAGE CONTENT] table presumably creating a "defalut" page size that would never be smaller than a standard for the side banner. Problem: larger page sizes are still a problem as are the changing map coordinates My other idea was to return to the original page design listed first above and again settle on a standard side banner "height"... ...any page that was significantly longer than that height would be split to 2 or more pages with a [NEXT>>] button at the bottom of the page navigating to the additional content. Problem: ...possible complications splitting content... Benefit: ...consistent page design that allows a consistent side banner with navigable links... Question for the group: Does this sound reasonable? Are there better alternatives I am overlooking? THANKS IN ADVANCE FOR ALL INPUT!! I want my link to open into a new window with no scrollbar or status bar and be 100% of the screen width and 66% of the screen height. Is there a way to do this? thanks in advance. hi everyone this is my first page so i will probably have a couple of questions to help give me an idea of how to do that i want! basically someone has asked me to design them a site, i did a web design course but that was 6 months ago and i need to learn new things for it as well as try and remember what ive learned! ive got a semi basic layout, ill post the html and css, hopefully ill pate them in the right way (this definitely wont be the colour scheme, ive been following an online tutorial, want to get the layout right before making other tweaks) basically in the content section theyre looking for a rectangular box that has 4 imaes, 2 side by side and two below. these will change when theyre rolled over and when a particular image is clicked it will take them to the correct section of the site. as far as i understand from the css i have the size of the content section will change depending on how much information is there. how would i know what size to make the flash for insertion into this section so it fits properly without any gaps? sorry im a bit new to this but the more i learn the better! i dont have a clue how to actually code the flash yet but getting the size right would be a good start! thanks for your help HTML Code: <link rel="stylesheet" type="text/css" href="css/master.css" /> </head> <body> <div id="page-container"> <!--this div will hold all the other elements of the page--> <div id="main-nav">Main Nav</div> <div id="header"> <h1> Kilmaclolm Dramatic Society logo to be placed here </h1> </div> <div id="sidebar-a"> <dl class="hidden"> <dt id="about"><a href="#">About</a></dt> <dt id="services"><a href="#">Services</a></dt> <dt id="portfolio"><a href="#">Portfolio</a></dt> <dt id="contact"><a href="#">Contact Us</a></dt> </dl> </div> <div id="content"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam gravida enim ut risus. Praesent sapien purus, ultrices a, varius ac, suscipit ut, enim. Maecenas in lectus. Donec in sapien in nibh rutrum gravida. Sed ut mauris. Fusce malesuada enim vitae lacus euismod vulputate. Nullam rhoncus mauris ac metus. Maecenas vulputate aliquam odio. Duis scelerisque justo a pede. Nam augue lorem, semper at, porta eget, placerat eget, purus. Suspendisse mattis nunc vestibulum ligula. In hac habitasse platea dictumst. </div> <div id="footer"><!--floated divs dhould come first to avoid any IE issues--> <div id="altnav"> <a href="#">About</a> - <a href="#">Services</a> - <a href="#">Portfolio</a> - <a href="#">Contact Us</a> - <a href="#">Terms of Trade</a> </div> Copyright © Kilmacolm Dramatic Society. A website by D Keenan </div> </body> </html> Code: @charset "utf-8"; /* CSS Document */ html, body { /*resets the margins and padding on both the html and body tags to 0 to ensure theres no space between the top of the browser and the top of the page */ margin: 0; padding: 0; } h1 { margin: 0; /* takes away the default margin and padding on h1 tags */ padding: 0; } .hidden { display: none; /* any element with this class wont be seen on the site */ } #page-container { /* there is a # as this is an id, to be used once on the page only, not repeated elsewhere this div's height will change depending on the content*/ margin: auto; /* browser sets margin, should centre the div */ width: 760px; /* sets the width of the container */ } #main-nav { background: red; height: 50px; /* the width doesnt need to be specified, it will be 760px as this is the with of the containing div */ } #header { background: blue; height: 150px; } #sidebar-a { float: left; /* floats sidebar to left of the screen */ background: darkgreen; /*the height is dependend on the content so no height will be set for the time being*/ width: 280px; } #content { background: green; /*the height is dependend on the content so no height will be set for the time being*/ margin-left: 280px; /*creates a margin as wide as the sidebar to separate the sidebar information and the content */ } #footer { clear:both; /*When an element has the clear property assigned, if it comes into contact with a float it is placed right below where that float ends.*/ background: orange; height: 66px; } Why are my 1000 pixels wide images are ok in FF and Chrome but seem to be 1.25% larger in IE? Thanks I don't know what part of this html is making the pictures in my table compressed width wise but if someone could help that would be fantastic. Here is the code: <style type="text/css"> body,table, td, li, p, div, textarea {font-family:Tahoma; font-size:12pt; color:ffffff; font-weight:none;} table, td { background-color:transparent; border:none; border-width:0;} body{background-image:url(http://i7.photobucket.com/albums/y28...onlybkgd.jpg); background-attachment:fixed; background-repeat:no-repeat; background-position:bottom right; background-color:179f99; } body {scrollbar-face-color:179f99; scrollbar-shadow-color:ffffff; scrollbar-highlight-color:ffffff; scrollbar-3dlight-color:ffffff; scrollbar-darkshadow-color:ffffff; scrollbar-track-color:87f5f3; scrollbar-arrow-color:ffffff;} .text {font-family:Tahoma; font-size:12pt; color:000000; font-weight:none} .redtext{font-family:Tahoma; font-size:10pt; color:000000; font-weight:bold} .redbtext{font-family:Tahoma; font-size:10pt; color:000000; font-weight:bold} .orangetext15{font-family:Tahoma; font-size:10pt; color:000000; font-weight:bold} .lightbluetext8{font-family:Tahoma; font-size:10pt; color:000000; font-weight:bold} .whitetext12{font-family:Tahoma; font-size:10pt; color:000000; font-weight:bold} .blacktext12{font-family:Tahoma; font-size:10pt; color:000000; font-weight:bold} .nametext{font-family:Tahoma; font-size:10pt; color:000000; font-weight:bold} .blacktext10{font-family:Tahoma; font-size:10pt; color:000000; font-weight:bold; background-color:transparent} strong, b {font-weight: bold; color:000000;} a{font-family:Arial; font-size:12pt; font-weight:normal;background-color:transparent;} a:link{color:000000;font-weight:bold;font-family:Arial} a:active{color:000000;font-weight:bold;font-family:Arial} a:visited{color:000000;font-weight:bold;font-family:Arial} a:hover{color:000000;font-weight:bold;font-family:Arial} a.redlink{font-family:Arial; font-size:12pt; font-weight:normal;background-color:transparent;} a.redlink:link{color:000000;font-weight:bold;font-family:Arial} a.redlink:active{color:000000;font-weight:bold;font-family:Arial} a.redlink:visited{color:000000;font-weight:bold;font-family:Arial} a.redlink:hover{color:000000;font-weight:bold;font-family:Arial} a.navbar{font-family:Arial; font-size:12pt; font-weight:normal;background-color:transparent;} a.navbar:link{color:000000;font-weight:bold;font-family:Arial} a.navbar:active{color:000000;font-weight:bold;font-family:Arial} a.navbar:visited{color:000000;font-weight:bold;font-family:Arial} a.navbar:hover{color:000000;font-weight:bold;font-family:Arial} a.man{font-family:Arial; font-size:10pt; font-weight:normal;background-color:transparent;} a:link{color:000000;font-weight:bold;font-family:Arial} a:active{color:000000;font-weight:bold;font-family:Arial} a:visited{color:000000;font-weight:bold;font-family:Arial} a:hover{color:000000;font-weight:bold;font-family:Arial} </style> <style> table, tr, td {background-color: transparent; border: 0px; padding:2;} table table {border: 2px;} table table table {border: 16px dotted; border-color: 87f5f3; background-color: ffffff; background-image:url(); padding:0;} table table table table{border: 0px;} table table table table table, table table table table table </style> <style> } table table table table {border:0px;} .{content:"Text and Link Properties";} input {background-color:transparent !important;} td, div, input, textarea, a, table td div div font, div table tr td font {font-family:Verdana !important;} td, div, input, textarea, table td div div font,div table tr td font {color:000000!important; font-size:10pt !important;} .nametext, .whitetext12, .lightbluetext8, .orangetext15, .blacktext12, .blacktext12 span,.redtext, .redbtext, .blacktext10, .btext {color:000000!important; font-size:10pt !important;} a {color:000000!important; font-size:10pt !important;text-decoration:none !important; text-transform:none !important; font-weight:normal !important; font-style:normal !important;} a:hover {color:000000!important; text-decoration:none !important; text-transform:none !important; font-weight:normal !important; font-style:normal !important;} <style type="text/css"> table table table {width:400px; !important;} table table td img {display:none;} table table table td img {display:inline;} table td td {width:0px;} table {width:500px;} table table {width:400px; !important;} table table td {padding:3px;} table table table td {padding:0px;} table table table {width:400px !important; height:0px;} td.text td a img {display: inline !important; } table table table table table, table table table table table td { width:0px !important; padding:0px !important;} td.text a img {width:130px } td.text td.text a img {width:100px !important; } td td td div strong {width:200px !important; display:block;} .redblackfonttext14{font-weight:normal} textarea, input, font, a, table, td, div, b {font-size:10pt !important;font-family:century gothic!important;font-weight:normal!Important;text-transform:lowercase} span {font-size:10pt !important;font-family:century gothic!important;font-weight:normal!Important;text-transform:uppercase} embed, object {display:inline} .orangetext15, .blacktext10 { display:block; width:300px; font-size:10pt !important;} td.text td.text .orangetext15, td.text td.text table table div {display:none;} .thanks:mrk{.} .mct{www.myspace.com/contacttables} </style> Yeah it's my myspace page. Sorry I'm such a dummy at html..... On my web site, I have images displayed in table cells. I have the width set to 100% and the table itself set to 80% width. I do that so that if the browser window size is reduced, then the table's size is reduced to fit the window without having to scroll left or right. That works great, unless the browser window is larger than what I design the page on as in if the end user is using a higher resolution monitor. In that case, the images are stretched rather than reduced to again fill the page. Code: <table border="0" width="80%"> <tr> <td width="50%"> <img src="image1.jpg" width="90%"> </td> <td width="50%"> <img src="image2.jpg" width="90%"> </td> </tr> </table> Is there a way that I can set a maximum size for the images so that they don't get stretched above their intended resolution, while still using the width=xx% attribute to reduce the images to match the window? I want to limit image uploading size. For example i want to set my image size max. 50kb . I'm fairly new to making websites, and I want to make a website with a full screen background image jpg, but I'd like it to be full screen in all resolutions. Is this posible? I want to use this image as a background http://img236.imageshack.us/img236/4...dexbackcu3.jpg and then add menus and text content. any tips? thanks! jdawest How to set width & height of background image ? Since generally we set background image for anything like table, div tag etc. but i need that the image size is very shot while assigning as background image so how can i manage this width & height ? Please tell me that how can i do it bcoz I am not able to resize it by css also. OR Whenever I put any image in background then it must show me full image not a croped image whether cell size is low or very high...Generally it crops image or sometimes it repeats image 2 or more times. Since i know i can stop the repeating image but I want to know to put the fully image in cell / table / div etc.. Regards.... Hi! I'm new to this site and new to HTML so please don't bash me. I really need help with a problem I have. I have four images as my buttons and links to various pages on my site. They're rectangles that spread out horizontally on my screen. However, not all computer screens are the same size, so at school for example, since the screen is smaller, the order of my links gets messed up. Is there any way to size an image so that it is 25% of a moniter? If so, could someone just like, right the code down so I may copy? I"m really bad at html. Any help would be appreciated. Thanks! Hi, I'm currently designing this website: www.carmelalopez.com and I'm trying to get the images on the left to fit the size of the browser screen on the right when you click on them. The images themselves are huge, so I'd like some kind of code that resizes the images to fit the size of the visitor's screen, which will vary from user to user. This might not be an HTML question (maybe CSS), but any guidance in the right direction would be greatly appreciated. Thank you. As a part of a project I am doing I want to display images on a website. The width/height of the image displayed on the screen should depend on the orientation of the image. The idea is to make the longer side 150px, so if width is greater than height then width=150px, else if height > width, then height=150px. Is there a simple way of doing this? My solution to this is to store the image height and width in a database (I already need to create a database for images), and am using onLoad attribute to change the width/height based on a boolean parameter which tell the orientation of the image, a test version of the code is here (wait for the image to load) http://www.confusionart.com/public/test.html However, as you can notice, first the complete image is loaded and then resized to the desired size. i.e. there is a unnecessary switching of sizes on screen. Is there any way to avoid this. Hi all, I am attempting to rework a training guide that includes lots of screen caps. The guide is currently in word format, but is too big now and all the full size screen caps make the guide difficult to read. I had intended to re-do the guide in HTML format so it can be viewed in a browser using maybe CSS to enlarge the thumbnails on mouse rollover. This would make the guide alot smaller, more functional and easier to read. With this being a training guide though, it will also need to be printed for new staff, so my question is... Is it possible to add some HTML/Java code that will see the thumbnail images printed as the orginal sized image rather than the thumbnail itself? Many thanks Joe Hi there, I have put a youtube video source in dreamweaver, and was wondering if anyone could tell me how i make it so the browser window the video is in clings to the video, i.e the frame is the exact size of the video. Also, however this is done, would it be the same code with images? Thanks in advance, Rob Here is the code <body> <td><a href="<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/NIktYSst2mw"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/NIktYSst2mw" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object> </body> </html> Hi, I would like to know if I can make the background image (over which I will write the content of the page) to fit the space I'm using. For example, I don`t how to explain it , but I see sites with the navigation bar image or the content image to adapt its size according to the amount of text on them. And then it seems like they are infinite, again, it adapts to the isze of the page. But my background image stays the same size all the time and I can see the end of it. I know I didn`t explain it very well but I don`t know exactly what I need to do this so, if someone could help me, thanks a lot. i have 2 frames in my parent frame say 1.htm ie left frame and 2.htm ie right frame now this 1.htm is quite a long frame and has a scrollbar and 2.htm is a short one i dont the scroll bar beside my frame 1 but want it to be for my entire parent window ie i wont to scroll both my left and right frames together how do i do that Yeah, it's probably a real simple question but it's bugging the heck out of me. I'm trying to design my first layout (hence why it looks so simple), but it's not working out. Here's the layout: http://www.lifeschronicles.net/index_test_brown.html I want the content boxes (pale brown) to run all down the page. How do I do that? Please help. Edit: Ok I have finally realised what I need to do. So simple! Haha. Can ignore/delete this thread if you want to. Sorry guys! Hello, I am making a squad list for my football team and i have created a table containing all the information; squad number, name , position etc. In the last column i want to have it so there is a blank field or a field with a ver small thumbnail in and when the cursor hovers over this an image appears, but only whilst the cursor is over that small part. hope this make sense |