...

View Full Version : A beginner problem



moshira
08-26-2008, 01:04 PM
hii ,
i am a begineer in css and i just have a small problem so just hope that anyone can guide me

i just made a table design with css and i have 5 classes: container, header,topnavigator,leftnavigator,content and footer

now i want to make background image in the content class ,i tried but it didnt work

#contents

{
position: absolute;
background-image: url('images/v9_09.jpg');
float: right;
width:500px;
left-margin: 50px;

}

thanks for ur help

croatiankid
08-26-2008, 01:28 PM
You're using the id selector (#) instead of the class selector (.).

VIPStephan
08-26-2008, 01:29 PM
Check for typos in your documents.
I canít say more because your CSS alone doesnít tell us anything. CSS is always and only working in conjunction with HTML. If you want proper advice, post everything.

Millenia
08-26-2008, 01:30 PM
hii ,
i am a begineer in css and i just have a small problem so just hope that anyone can guide me

i just made a table design with css and i have 5 classes: container, header,topnavigator,leftnavigator,content and footer

now i want to make background image in the content class ,i tried but it didnt work

#contents

{
position: absolute;
background-image: url('images/v9_09.jpg');
float: right;
width:500px;
left-margin: 50px;

}thanks for ur help

To start with, it's not a content class, it's a content id. It has a "#" not a "."

so it would be


<div id="contents">Stuff</div>Now change your CSS to this:


#contents

{
position: absolute;
background-image: url(images/v9_09.jpg);
float: right;
width:500px;
left-margin: 50px;

}I took the " ' " from the background-image

About classes and Id's:

If you have this:


#content {
}

you would use
<div id"content">

if you have this:


.content {
}

you would use

<div class="content">

moshira
08-26-2008, 02:42 PM
thanks all i get it :)

so now i have another small problem

i want to make a left navigatiom menu with a rollover effect i did it using html tables and a jsscript for the rollover images but i cant make it with css as i dont know how to replace the cell of the tables i have

as i understood that i must make a class first with certain width and then put on the stuff i want

#leftmenu

{
float: left;
background-color: green;
width: 164px;
height:387px;
}

the cells of html table i want to make in css:

<tr>
<td colspan="3">
<a href=#><img src="images/v2_10.jpg" width="164" height="26" alt="" name="myimage1" border="0" onMouseOver="mouseon('myimage1')" onMouseOut="mouseoff('myimage1')"></a></td>

</tr>
<tr>
<td colspan="3">
<img src="images/v2_11.jpg" width="164" height="25" alt="" border="0" onMouseOver="mouseon('myimage2')" onMouseOut="mouseoff('myimage2')" name="myimage2" ></td>
</tr>
<tr>
<td colspan="3">
<img src="images/v2_12.jpg" width="164" height="27" alt="" name="myimage3" border="0" onMouseOver="mouseon('myimage3')" onMouseOut="mouseoff('myimage3')"></td>
</tr>

<tr>
<td colspan="3">
<img src="images/v2_13.jpg" alt="" width="164" height="65" border="0" usemap="#Map2"></td>
</tr>
<tr>
<td colspan="3">
<img src="images/v9_14.jpg" width="164" height="31" alt=""></td>
</tr>
<tr>

<td>
<img src="images/v9_15.jpg" width="8" height="141" alt=""></td>
<td>
<img src="images/v9_16.jpg" width="148" height="141" alt="" name="borg"></td>
<td>
<img src="images/v9_17.jpg" width="8" height="141" alt=""></td>
</tr>
<tr>
<td colspan="3">

<img src="images/v9_18.jpg" alt="" width="164" height="44" border="0" usemap="#Map"><map name="Map"><area shape="rect" coords="125,6,140,19" href="#" href="#" onClick="change('borg','images/1111.jpg');return false;"><area shape="rect" coords="21,7,35,20" href="#" href="#" onClick="change('borg','images/11.jpg');return false;"></map>
<map name="Map2"><area shape="rect" coords="130,48,157,61" href="#"></map>
</td>
</tr>
<tr>
<td colspan="8">
<img src="images/v9_19.jpg" width="777" height="26" alt=""></td>
</tr>


p.s. i am sorry for the long post and i really appreciate ur help

jerry62704
08-26-2008, 03:49 PM
hii ,
i am a begineer in css and i just have a small problem so just hope that anyone can guide me

i just made a table design with css and i have 5 classes: container, header,topnavigator,leftnavigator,content and footer

now i want to make background image in the content class ,i tried but it didnt work

#contents

{
position: absolute;
background-image: url('images/v9_09.jpg');
float: right;
width:500px;
left-margin: 50px;

}

thanks for ur help

No one questioned the absolute and floating position of the css? Floating would have no context for something that is positioned absolutely.

Millenia
08-26-2008, 04:29 PM
By the way, you're making a table layout right?

DON'T!

Why tables for layout is stupid (http://www.hotdesign.com/seybold/)
Go there

moshira
08-26-2008, 04:58 PM
ea i know tables are stupied
thats why i am trying to learn how to do it in css :)

VIPStephan
08-27-2008, 12:28 AM
For CSS rollover links look into this one: http://wellstyled.com/css-nopreload-rollovers.html

moshira
08-27-2008, 01:49 AM
thanks very much

Moodle
08-27-2008, 03:00 PM
ea i know tables are stupied
thats why i am trying to learn how to do it in css

Tables in CSS? What next...

Oh, and your subject needs a little modding.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum