Author Topic: How to resize border in HTML/CSS and center images?  (Read 3272 times)

I found out you cant use the <center> tags to center images anymore, so I don't know what to do. I'm trying to put it at the top.

Also, How do I resize a solid border, or center it and then wrap that around whatever?

(sorry for making another topic :( )

Did you search google? If not where the forget is your common sense at?

Did you search google? If not where the forget is your common sense at?

Could you like, be nice? And yes, I did use google.

Could you like, be nice? And yes, I did use google.

he wasn't mean

he's saying if you didn't google search it, you're an idiot

he wasn't mean

he's saying if you didn't google search it, you're an idiot

okay, whatever, do you know?

<img align="center" other stuff>

<img align="center" other stuff>

could you give an example? also, won't that put in the center of the screen, not the top?

with css you can center elements by setting the left and right margin to auto. they also have to be block display. example:

Code: [Select]
.idk{
  display: block;
  margin: 0px auto;  (<- using this syntax, this changes the top & bottom margins to 0, and the left & right to equal amounts, centering stuff.)
}

I'm guessing by "resize borders" you mean changing the thickness and that can be done by:

Code: [Select]
#whatever{
  border: 1px (<- change that) solid #000;
}

which section would you place those in, <body> or <style>?

I'm guessing you're really new to this, but it would go in <style>. All CSS goes in style. But - unless it's just a simple one-page dealio - I would recommend writing all CSS on an external stylesheet, and link that to your HTML file in the <head>

I'm guessing you're really new to this, but it would go in <style>. All CSS goes in style. But - unless it's just a simple one-page dealio - I would recommend writing all CSS on an external stylesheet, and link that to your HTML file in the <head>

yeah, i'm pretty new to it. also, the image just completely disappeared. i don't quite understand what a stylesheet is.

could you give an example? also, won't that put in the center of the screen, not the top?

<img align="center" src="http://forum.blockland.us/Themes/Blockland/images/smflogo.png">

Quote
<!DOCTYPE HTML>
<html>
<head><title>Toons Revolution</title>
<style>
</style>
</head>

<body>
<body style="background-color:lightskyblue;">

<img align="center" src="http://toontownrevolution.com/img/header.png" width="400" height="200"/>

<p style="text-align:center;">A fansite for the website <a href="toontownrevolution.com">Toontown Revolution</a></p>

</body>
</html>

the image is still centered to the left.


the image is still centered to the left.

okay, so, i took that code and changed the image to:

Code: [Select]
<center><img src="http://toontownrevolution.com/img/header.png" width="400" height="200"/></center>
and then it was centered when i tried it