Page 1 of 2

div and css big problem

Posted: Fri Aug 22, 2008 12:50 pm
by jasondsouza
i find it really dificult to work with div and css tags... can someone give a good explanation of how to align your web site images using div and css... i find it to be a piece of cake if i use tables...

Posted: Sat Aug 23, 2008 4:48 am
by thetarget
What layout you are you working on?

Sometimes it is best to use tables if it is easier.

Posted: Sat Aug 23, 2008 3:27 pm
by Lixas
use "class" for your divs and you could align how you want:

[HTML]<div class="css_class_name">your image</div>[/HTML]
and on css use:

Code: Select all

.css_class_name
	{
		margin-left: -42px;
		font-family: Arial;
		font-size: 9px;
		color : black;
		text-transform:uppercase;
		font-stretch: ultra-expanded;
	}
P.S. this css is just an example from my website, but i hope it will give you a clue how to work with div's and css'es

Posted: Mon Aug 25, 2008 5:02 pm
by jasondsouza
Lixas wrote:use "class" for your divs and you could align how you want:

[HTML]<div class="css_class_name">your image</div>[/HTML]
and on css use:

Code: Select all

.css_class_name
	{
		margin-left: -42px;
		font-family: Arial;
		font-size: 9px;
		color : black;
		text-transform:uppercase;
		font-stretch: ultra-expanded;
	}
P.S. this css is just an example from my website, but i hope it will give you a clue how to work with div's and css'es
I'm trying to design a joomla template.... i cannot use a image tag in it.... i'm supposed to use those images in a css file itself.... hence getting confused in replicating a table structure

Posted: Tue Aug 26, 2008 11:50 pm
by thetarget
How many pictures are there?

div { Background: url('http://someurl.com/someimg.jpg') }

If i remembered correctly, the correct way of using joomla is through its modules. You code the layout, and set the images in the GUI.

Posted: Mon Sep 08, 2008 11:26 am
by delivi
set the following style to display the image in the div without putting an image tag.

Code: Select all

.css_class_name
  {
     margin-left: -42px;
     font-family: Arial;
     font-size: 9px;
     color:#000;
     text-transform:uppercase;
     background:url("IMAGE_PATH") no-repeat;
     height:HEIGHT_OF_IMAGE px;
     width:WIDTH_OF_IMAGE px;
  }
if you've any doubts on this let me know :)

Posted: Sun Sep 21, 2008 8:50 pm
by leegao
Remember that if you assign a padding to the container, you have to manually compensate for it by adding the same amount to the height and the width. However if you have a border, then it gets a lot more complicated due to the fact that IE and FF renders the border differently. In that case you'll need an IE conditional, and it would be better to just use an image in such cases.

Posted: Sat Oct 11, 2008 5:59 am
by tewage
I actually code joomla layouts, if you need help coding PM me.

DOES YOUR CAT OWN YOU

Posted: Thu Nov 26, 2009 6:20 pm
by tuvw978
See how many yes answers apply to you. ? Do you select your friends based on how well your cats like them?? Does your desire to collect cats intensify during times of stress?? Do you buy more than 50 pounds of cat litter a month?? Do you think it?s cute when your cat swings on your **** or **** your butter?? Do you admit to non-cat owners how many cats you really have?? Do you sleep in the same position all night because it annoys your cats when you move?? Do you kiss your cat on the whiskers?? Do you feed your cat tidbits from the table with your fork?? Does your cat sleep on your head?? Do you like it?? Do you have more than four opened but rejected cans of cat food in the refrigerator?? Do you watch bad TV because the cat is sleeping on the remote?? Will you stand at the open door indefinitely in the freezing rain while your cat sniffs the door, deciding whether to go out or come in?? Would you rather spend a night at home with your cat than go out on a bad date?? Do you put off making the bed until the cat gets up?? Do you give your cat presents and a stocking at Christmas?

Div and CSS

Posted: Fri Dec 04, 2009 3:23 pm
by Gebbo
Lixas wrote:use "class" for your divs and you could align how you want:

[HTML]<div class="css_class_name">your image</div>[/HTML]
and on css use:

Code: Select all

.css_class_name
	{
		margin-left: -42px;
		font-family: Arial;
		font-size: 9px;
		color : black;
		text-transform:uppercase;
		font-stretch: ultra-expanded;
	}
P.S. this css is just an example from my website, but i hope it will give you a clue how to work with div's and css'es
Not a bad example.. lol reminds me of the old days..