View Full Version : CSS & DIV Help !!
sd.athar
03-11-2008, 07:11 AM
Hello Everybody !
actually i have jst started using css and div tags and i getting difficult to use it .. if any one can temme wer can i get complete reference of CSS and DIV tags.
rangana
03-11-2008, 07:35 AM
I personally got a number of inputs in these sites:
http://www.w3schools.com/css/default.asp
http://www.w3.org/MarkUp/Guide/Style
http://www.tizag.com/cssT/
http://reference.sitepoint.com/css
http://xhtml.com/en/css/reference/
See if it helps ;)
codeexploiter
03-11-2008, 08:16 AM
http://www.htmldog.com/reference/cssproperties/
Div is just a block level element like <p> browsers usually place a line break before and after a div element.
tech_support
03-11-2008, 09:23 AM
Usually? No, always. <div> and <p> tags automatically have display:block; embedded, so they will always have a line break before and after.
codeexploiter
03-11-2008, 10:01 AM
As I've mentioned by default div is a block level element without any doubt. But it is possible to convert a block level element like a div element to an inline element using CSS.
In such situation if the user have to examine both CSS and (X)HTML source to find which are acting as full-fledged block level elements and as inline elements.
So in order to avoid such confusion in such situations I've phrased it as "usually".
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title> </title>
<style type="text/css">
.inlinediv{
display: inline;
}
</style>
<script type="text/javascript">
</script>
</head>
<body>
<div>Test </div>
<span>This is a </span><div class="inlinediv">test</div>
</body>
</html>
In the above case the highlighted <div> element will not have any preceding and succeeding line breaks.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.