Hello friends and sir
i'm using this <img src="url.jpg" align="center" /> but it's not working
i'm also using style float to align image at center but it's also not working; only <center> &
<div align="center"> tag works
so my question is what's wrong in align using style float & using attribute in image tag.
Thanking you
it would be appropriate if you provide us the piece of code. I cant find anything wrong in what you provided.
ok Sir
here is the code
<table bgcolor="#2b2c1e" width="100%" height="20%" style="border-collapse: collapse" cellpadding="0" cellspacing="0" id="AutoNumber2">
<tr>
<td>
<div align="center"><img border="0" src="GuruArjanDevJi.jpg" style="margin-left: 10px" /></div>
</td >
<td>
<div align="center"><img border="1" src="hi.jpg" /></div>
</td>
</tr>
</table >
& the images are
In this images when i used align in image tag it's not working & also style float not working.
I use a css class in such instances.
I would define the class in the css sheet as:-
| Code: |
.pic_center{
align: center;
border: whatever;
padding: whatever;
margin: whatever;
}
|
and then on the page add the class tag where required:-
| Code: |
<td class="pic_center">
|
By doing it this way you can have a center-aligned image anywhere by adding the class to the tag.
Hope this solves your problem.[/code]
@ doctorbeaver
Sir i have also used class style
& even now i have tried it but it's also not working .
Only center tag & <div align="center"> tag works.
What's the browser, browser version and the Operating System you are using?
Are you sure you're loading the css style sheet OK? Have you got the path & name absolutely correct? Do the other css styles from the same style sheet work OK?
Also, are you using Transitional or Strict?
When using the
| Code: |
| <div align="center"><img .... /></div> |
or
| Code: |
| <center <img .... /></center> |
It is centering what is inside the tags.
You can center a image because its like the same width as the original image and its not like in it.
I can't really explain.
The image say is 50px and then the image tag is displaying it as 50px so the center is the same position as it is.
And its not in the original tag what is centering stuff whats inside it.
Maybe try with:
| Code: |
| <table align="center" bgcolor="#2b2c1e" width="100%" height="20%" style="border-collapse: collapse" cellpadding="0" cellspacing="0" id="AutoNumber2"><tr>... |
or with:
| Code: |
<table bgcolor="#2b2c1e" width="100%" height="20%" style="border-collapse: collapse" cellpadding="0" cellspacing="0" id="AutoNumber2">
<tr>
<td align="center">
<img border="0" src="GuruArjanDevJi.jpg" style="margin-left: 10px" /></div>
</td >
<td align="center">
<img border="1" src="hi.jpg" /></div>
</td>
</tr>
</table >
I how it'll help you :) |
Ok sir
Is there any way to give the border to paragraph or to some particular things???????
I know we can give the border to table but if i wanna to give the border to paragraph or to image; then what's the method to give the border????
If you know the width of your image you can use this code:
| Code: |
<img src="YOURIMAGE.jpg" style="width: WIDTH; margin-left: auto; margin-right: auto;" />
|
(The width is usually like this: 00px but not all zeros
)
For border use this:
| Code: |
<div style="border: #000000 1px solid;">
CONTENT HERE...
</div>
|
(That's a Solid Black Border 1px wide)
Check Out:
http://www.w3.org/Style/Examples/007/center (for centering stuff)
http://w3schools.com/css/css_border.asp (for the borders)
Is there any option available in html by which i can give the email link of mine?
| Code: |
<a href="mailto:rvec@bierkip.nl">Send me an
email</a> |
Will display a link. And if the user clicks on it it will open the default mail application and use the email (yaron@bierkip.nl) as the addressee.
| rvec wrote: |
| Code: | <a href="mailto:rvec@bierkip.nl">Send me an
email</a> |
Will display a link. And if the user clicks on it it will open the default mail application and use the email (yaron@bierkip.nl) as the addressee. |
But.... the code says rvec@bierkip.nl lol
| DjMilez wrote: |
| rvec wrote: | | Code: | <a href="mailto:rvec@bierkip.nl">Send me an
email</a> |
Will display a link. And if the user clicks on it it will open the default mail application and use the email (yaron@bierkip.nl) as the addressee. |
But.... the code says rvec@bierkip.nl lol |
so? Isn't that what it is supposed to?
edit: oh lol yaron == rvec 
| rvec wrote: |
| Code: | <a href="mailto:rvec@bierkip.nl">Send me an
email</a> |
Will display a link. And if the user clicks on it it will open the default mail application and use the email (yaron@bierkip.nl) as the addressee. |
Thanks sir
Work fine for me