Comments (20)
The pictures will probably look huge on newtfire, too! Yes, you can control the image size, and in a few different ways:
- You can experiment with setting width and height for your img elements in CSS (and look up how and some examples in the w3schools tutorials/reference).
And/or - You could open your trip pictures in software that edits images--your computer probably has a photo editor of some kind installed. And you can save a smaller version of your images by locking their width and height proportions, and reducing them say 25 or 50 percent..and viewing in the browser locally until they look about the size you want. (Be careful not to save overtop your original photos! I'd save a new set of smaller web-page ready images separately from my originals.)
You don't really have to do 2) unless you notice there is some lag in the browser loading your pictures--notice if the file size of an image seems really big, say larger than 1600 pixels on one side, or several hundred megabytes in file size. We don't really need high-resolution images on websites, usually, so it's common to present a medium-res, scaled-down version of a digital camera photo optimized for web viewing.
Another thing people do with LOTS of pictures is make a tiny "thumbnail" size view to set up on a main page. You could then make a hyperlink on each image so when a visitor clicks on it, it opens a larger version of the image that you have stored in your web directory. People sometimes make an "image" directory on web space to store a big pile of images, and you can actually link to a .jpg or .png (the typical image formats on the web) so it opens by itself as picture.jpg in the browser window. Your code for that, if you post a thumbnail on an xhtml page and link out to a bigger image, might look like this:
<a href="images/imageBig.jpg"><img src="imageTinyThumbnail.jpg" alt="an Irish castle"/></a>
Here, the outer <a>
element makes a link into a folder you've set up in your web space on newtfire called "images" and steps into that folder to find a file called imageBig.jpg, which would open on click in a new window. Inside is a self-closing HTML <img>
element that makes it possible to render a different (smaller) version of the image on the web page. I haven't indicated that the file is in a subdirectory, so the web browser will look for imageTinyThumbnail.jpg in the same, main website directory where I've saved my .xhtml files like index.xhtml. These are examples of relative links which are always a good idea to use when referencing internal files in a project website. (You'd use absolute links or a full website address starting with http:// if you're pointing to a page off site, like:
http://www.pitt.edu. )
Notice that valid xhtml requires you to hold an @alt
attribute containing a plain text description of your image. That's one of the few places where a plain text phrase or sentence is actually appropriate in XML markup! It's used as a string of text that loads in place of a picture if the picture fails to be rendered in the web browser, and it also replaces the picture for anyone using a screen reader or Braille browser for blind or visually disabled viewers of the Internet.
Hope that helps and gives you some ideas!
@nlottig94
from dhclass-hub.
Okay, so I looked in the reference section and found "object-fit". However, it doesn't quite tell me what I can put after this...is it a number??
from dhclass-hub.
CSS, right? Let me take a look--it's not one I typically use...
from dhclass-hub.
Yes, CSS
from dhclass-hub.
I figured it out! Thanks for the help!!
from dhclass-hub.
I usually work with width and height properties in CSS, and usually I only need to list and reset the width (so height is altered proportionally as you change a width)
See an example (on a different element) here in w3schools:
http://www.w3schools.com/cssref/pr_dim_width.asp
from dhclass-hub.
👍 How did you do it @nlottig94 ?
from dhclass-hub.
Also, let's leave this issue open in case others have questions like it!
from dhclass-hub.
I used the width and height properties!
from dhclass-hub.
Good! So here's a question I don't immediately remember the answer to: Can you change an image size proportionately just by resetting the width property alone, without using height?
from dhclass-hub.
Yes. I set a max-width of 50% and made the height auto. If that makes any sense.
from dhclass-hub.
Very helpful--thank you! That's how you adjust height so it is proportional to width. 👍
from dhclass-hub.
Are we supposed to save our webpage like we usually save our assignments? (Ex: lottig_10-03_xhtmlExercise1.xhtml) Or are we supposed to save it as something else? Also, we are uploading this to the newtfire site, correct?
from dhclass-hub.
Yes, upload to newtfire! If I remember correctly we are checking this assignment by going to each of your sites on newtfire. @nlottig94
from dhclass-hub.
Yes, we ask you to post your files in newtFire, and then we'll retrieve
your files from your newtFire webspace.
Dr. B
On Sun, Oct 4, 2015 at 6:39 PM, Rebecca Parker [email protected]
wrote:
Yes, upload to newtfire! If I remember correctly we are checking this
assignment by going to each of your sites on newtfire.—
Reply to this email directly or view it on GitHub
#27 (comment)
.
Elisa Beshero-Bondar, PhD
Associate Professor of English
University of Pittsburgh at Greensburg
Humanities Division
150 Finoli Drive
Greensburg, PA 15601 USA
E-mail: [email protected]
about.me/ebbondar
from dhclass-hub.
Okay, thanks! But do we still have our file names the same as we usually do?
from dhclass-hub.
Ah, good question! No--not this time! And that is only because your files are going into your webspace, so the webspace holds the identifying info for each of you. So, name your files what makes sense for your webpages, probably index.xhtml and index.css or website.css or whatever you like. Be sure you've properly associated your CSS with your XHTML when you post: that is one thing we are looking to be sure you've done.
Hope this helps!
Dr. B
Sent from my iPad
On Oct 4, 2015, at 6:47 PM, Nicole Lottig [email protected] wrote:
Okay, thanks! But do we still have our file names the same as we usually do?
—
Reply to this email directly or view it on GitHub.
from dhclass-hub.
Is there a way to center an image? I tried using the margins and position, but it doesn't seem to do anything.
from dhclass-hub.
@brookestewart check out this link and let me know if this helped you: http://www.w3.org/Style/Examples/007/center.en.html#block
or go check out the css on for my website ... notice the image on my homepage is centered.
from dhclass-hub.
@RJP43 Yes, it helped. Thank you!
from dhclass-hub.
Related Issues (20)
- HTML Semantic Elements for structuring a page
- Steve Ramsay: "The Hermeneutics of Screwing Around" and "In Praise of Pattern" HOT 13
- NEWS HOT 2
- XPath format-date() picture strings
- First XQuery over Banksy from class today
- Saving XQuery Files
- Network Analysis HOT 16
- Schematron Quick Fix HOT 1
- SOS: Cytoscape is my mortal enemy HOT 8
- M 3/23 Class Sign-in HOT 12
- Slack Chat for DH class
- Semester project presentations HOT 1
- zoom video HOT 3
- Date Arithmetic for Data Visualization: User-Defined Functions in XQuery
- Resources on JavaScript Properties, Methods, Events
- Upcoming Presentations!
- Choose a Creative Commons License for Your Project
- Friday April 17: Presentation Day and Feedback!
- XPath: Taking Average of values derived by a FLOWR statement HOT 8
- Extended due date for semester projects in the quarantine semester
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dhclass-hub.