• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Having problem with HTML and CSS

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am creating a webpage and put a check box on the page using this line of code

<div class="checkbox" Align="right"> <input type="checkbox" name="keepmeloggedin" value="keep me logged in" checked/> keep me logged in </div>

I then use this line of CSS

.checkbox {position: relative; right: 347px;}

When i apply this CSS code i can no longer click to check or uncheck the box. when i remove the CSS it functions normally but then is not in the position i want it to be in.
Any suggests will help. I'm pretty ignorant to the subject.
 
Sheriff
Posts: 67399
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post an SSCCE of jsFiddle showing this issue? I'd like to recreate it.
 
Bear Bibeault
Sheriff
Posts: 67399
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And a nit: using both CSS and an attribute such as align="right" is a recipe for disaster. Use CSS and avoid deprecated styling attributes like align.
 
Z Ar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have tried removing the align right and it does not fix the problem. I am also not familiar with what sscce or jsfiddle are. I'm a very novice user at the moment.
 
Bear Bibeault
Sheriff
Posts: 67399
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't say removing the align would fix anything, just that its a bug waiting to happen and a poor practice.

SSCCE
 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am just wondered how it does not work in your case :

here it works perfectly for me, and for little alignment issue i just remove the align of the check box

here is the working example:

http://jsfiddle.net/pgyejvmo/1/
 
    Bookmark Topic Watch Topic
  • New Topic