PDA

View Full Version : css problems


Terrys
01-13-2015, 10:47 AM
Hi,
I'm new to this forum, so be gentle with me.
I have created a simple form in html. All looks okay however when trying to style it the css does not work. I have added an external style sheet and created some selectors. For example .... a selector for the formWarp "width 700px" makes no change to the form. all other selectors are the same. I'm using DW5.5 on windows7 64bit. will be grateful for any help.

Terrys

edbr
01-13-2015, 11:24 AM
Need to see your code

Terrys
01-13-2015, 12:00 PM
Hi,
Thanks for your prompt reply, her is the html 1111

Terrys

d a v e
01-13-2015, 12:05 PM
not sure why you're using a transitional doctype - why not html5?!

also you've only included your html - we need the css too ;)

codepen is handy for showing code and making it easy for us as well
http://codepen.io/

Terrys
01-13-2015, 12:24 PM
Hi, Here is the css. code.1112

hope its readable., dont know codepen but will have a look

Terrys

d a v e
01-13-2015, 02:36 PM
in your css you need to use a class
you have
formWrap {
width:700px;
}

and you need a period in front

.formWrap {
width:700px;
}
********
then in your html you have
<div ="formWrap">

but you need to use the class you defined in the stylesheet

<div class="formWrap">


if you're styling an html element (in your css) you don't need a class or an id, so NOT
#body

just
body

Terrys
01-13-2015, 03:11 PM
Hi,, have altered my code as you suggested so now have "body" instead of "#body" .And the color selector works.
Have altered the html code to "div class="formWrap">"
and the css to....
.formWrap {
width:700px;
margin-top: 30px;
margin-left: 30px;
}
but there is no change in the style of the html form.

Terrys

Ricky55
01-13-2015, 08:03 PM
Css 101, if you don't know that I'd suggest some training or you'll be pulling your hair out.

d a v e
01-14-2015, 06:38 AM
Looking at all the nested divs and non-html5 use i would definitely take ricky's advice and cover the basics first

quick e.g. still rough and ready http://gekkoweb.com/stuff/formwrap/

Terrys
01-14-2015, 08:20 AM
Thank you for all your help.

Terrys

Ricky55
01-16-2015, 07:24 PM
Do come back though if you need any help.