DIVaculties

  • Thread starter Thread starter J.B
  • Start date Start date

J.B

J.B

Soldato
Joined
16 Aug 2006
Posts
5,924
What a catchy thread name! :D

Im hoping someone could help with a <DIV> problem. I've looked on google but cant seem to find my problem. Im expermenting with div tags and am having some trouble:

Code:
<head>

<title>Untitled Document</title>
<link href="/CSS-Div.css" rel="stylesheet" type="text/css" />
</head>

<body>

<div style="top: 107px;
      left: 307px;
      position: absolute;
	  width: 172px;
      visibility: show;">Tester</div>

<div class="header">CSS Test </div>
</body>
</html>

Code:
div.header {

top: 138px;
left: 174px;
position: absolute;
width: 172px;
visibility: show;
}

Basicly, the DIV with its attributes in the HTML code works well, but the CSS attributes arent being picked up. Im betting I missed something blindingly obvious but I cant see it!

Just so you know; I've tried other tags in the CSS file work so its deffernatly linked to the HTML correctly
 
and changing "class=header" to "id=header"?

when I do that it moves the div box to the correct position on DW, but not when I actually look at the page in IE
 
Yeah I normally try not to use DW for any hardcore coding, but i thought this piece of code is so simple how can it go wrong! :rolleyes:

I havent tried it in any other browser, it really needs to be viewable in IE and I dont have anything else installed
 
Well basicly I dont want it set in any perticular way, Im just experimenting with CSS and DIV. Would just like to be able to edit the CSS to move a box around.

It's nothing overly important I just thought it's time I learnt how to do this properly
 
Ok thanks guys. Both those ways seem to work, no idea whats happened there! :confused:

While I've got people attentions would someone mind explaining why someone would use class and why someone would use id?
 
Back
Top Bottom