Win a copy of Event Streams in Action this week in the Java in General forum!
  • 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
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

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.
 
Marshal
Posts: 67273
170
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
Marshal
Posts: 67273
170
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
Marshal
Posts: 67273
170
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
 
Greenhorn
Posts: 19
  • 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/
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!